/** * @inheritdoc * * Additionally, tracks attached behaviors to allow iterating over them. */ public function attachBehavior($name, $behavior) { $this->_behaviors[$name] = $name; unset(self::$_names[get_class($this)]); return parent::attachBehavior($name, $behavior); }