API CHANGE Removed ViewableData->setVal(), use ViewableData->setValue()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64383 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-10-16 08:44:32 +00:00
parent 189501b775
commit 2d44f59816
3 changed files with 5 additions and 12 deletions

View File

@ -114,7 +114,7 @@ class ViewableData extends Object implements IteratorAggregate {
/** /**
* Setter overloader. * Setter overloader.
* Allows default setting of fields in $this->setVal(), or mediation via a * Allows default setting of fields in $this->setValue(), or mediation via a
* getParamName() method. * getParamName() method.
* @param string $field The field name. * @param string $field The field name.
* @param mixed $val The field value. * @param mixed $val The field value.
@ -338,9 +338,9 @@ class ViewableData extends Object implements IteratorAggregate {
if($constructor) { if($constructor) {
$fieldObj = eval($constructor); $fieldObj = eval($constructor);
if($this->hasMethod('getAllFields')) { if($this->hasMethod('getAllFields')) {
$fieldObj->setVal($val, $this->getAllFields()); $fieldObj->setValue($val, $this->getAllFields());
} else { } else {
$fieldObj->setVal($val); $fieldObj->setValue($val);
} }
} }
} }

View File

@ -51,13 +51,6 @@ abstract class DBField extends ViewableData {
return $dbField; return $dbField;
} }
/**
* @deprecated
*/
function setVal($value, $record = null) {
return $this->setValue($value, $record);
}
/** /**
* Set the name of this field. * Set the name of this field.
* The name should never be altered, but it if was never given a name in the first place you can set a name. * The name should never be altered, but it if was never given a name in the first place you can set a name.

View File

@ -6,7 +6,7 @@
*/ */
class Time extends DBField { class Time extends DBField {
function setVal($value) { function setValue($value) {
if($value) { if($value) {
if(preg_match( '/(\d{1,2})[:.](\d{2})([ap]m)/', $value, $match )) $this->_12Hour( $match ); if(preg_match( '/(\d{1,2})[:.](\d{2})([ap]m)/', $value, $match )) $this->_12Hour( $match );
@ -15,7 +15,7 @@ class Time extends DBField {
} }
function setValue($value) { function setValue($value) {
return $this->setVal( $value ); return $this->setValue( $value );
} }
function Nice() { function Nice() {