Model::__set PHP Method

__set() public method

Magic setter method, allows $model->property = 'value' access to data.
public __set ( string $property, string $value ) : void
$property string
$value string
return void
    public function __set($property, $value)
    {
        $this->orm->set($property, $value);
    }

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 public function __set($strKey, $varValue)
 {
     if ($this->arrRelations[$strKey]['type'] == 'haste-ManyToMany' && !is_array($varValue)) {
         throw new \InvalidArgumentException('Values set on many-to-many relation fields have to be an array');
     }
     parent::__set($strKey, $varValue);
 }
All Usage Examples Of Model::__set