/** * Determines if an ActiveRecord has the specified property (in its default mode its pretty useless unless i * @param string $name * @param bool $dynamicOnly if true it will only check the dynamically added attributes, not the public ones * @return bool */ public function hasAttribute($name, $dynamicOnly = false) { if ($dynamicOnly) { return array_key_exists($name, $this->attributes); } return $dynamicOnly ? false : parent::hasAttribute($name); }