__set() public method

Block changing the readonly dynamic property
public __set ( string $name, mixed $value )
$name string
$value mixed
Example #1
0
 /**
  * Block changing the readonly dynamic property
  *
  * @param string $name
  * @param mixed $value
  */
 public function __set($name, $value)
 {
     switch ($name) {
         case 'attr':
             $this->attr($value instanceof Query\Attributes ? $value->toArray() : $value);
             break;
         case 'css':
             $this->css($value);
             break;
         case 'data':
             $this->data($value instanceof Query\Data ? $value->toArray() : $value);
             break;
     }
     parent::__set($name, $value);
 }