__set() публичный Метод

Do not call this method. This is a PHP magic method that we override to allow using the following syntax to set a property or attach an event handler. $this->PropertyName=$value; $this->jsPropertyName=$value; // $value will be treated as a JavaScript literal $this->EventName=$handler; $this->fxEventName=$handler; //global event listener When behaviors are enabled, this will also set a behaviors properties and events.
public __set ( $name, $value )
Пример #1
0
 /**
  * Magic method for writing properties.
  * This method is overriden to provide write access to the foreign objects via
  * the key names declared in the RELATIONS array.
  * @param string property name
  * @param mixed property value.
  * @since 3.1.2
  */
 public function __set($name, $value)
 {
     if ($this->hasRecordRelation($name) && !$this->canSetProperty($name)) {
         $this->{$name} = $value;
     } else {
         parent::__set($name, $value);
     }
 }