Ejemplo n.º 1
0
 /**
  * Get a behavior by identifier.
  *
  * @param mixed $behavior Behavior name
  * @param array $config   An array of options to configure the behavior with
  *
  * @see KMixinBehavior::getBehavior()
  *
  * @return AnDomainBehaviorAbstract
  */
 public function getBehavior($behavior, $config = array())
 {
     if (is_string($behavior)) {
         if (strpos($behavior, '.') === false) {
             $identifier = clone $this->getIdentifier();
             $identifier->path = array('controller', 'behavior');
             $identifier->name = $behavior;
             register_default(array('identifier' => $identifier, 'prefix' => $this));
             $behavior = $identifier;
         }
     }
     return parent::getBehavior($behavior, $config);
 }