public function hasAttribute($name) { return isset($this->_attributes[$name]) || in_array($name, $this->attributes(), true); }
/** * @inheritdoc */ public function __set($name, $value) { if ($this->_relation->hasAttribute($name) || $this->_relation->canGetProperty($name)) { $this->_relation->{$name} = $value; } else { parent::__set($name, $value); } }