public function clearBehaviors() { if ($this->_m !== null) { foreach ($this->_m->toArray() as $name => $behavior) { $this->detachBehavior($name); } $this->_m = null; } }