/** * Returns a property value or an event handler list by property or event name. * This method overrides the parent implementation by returning * a key value if the key exists in the collection. * @param string $name the property name or the event name * @return mixed the property value or the event handler list * @throws CException if the property/event is not defined. */ public function __get($name) { if ($this->contains($name)) { return $this->itemAt($name); } else { return parent::__get($name); } }