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);
    }
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);
    }
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 ) ; }
Get a behavior by identifier.

@param mixed $behavior Behavior name
@param array $config   An array of options to configure the behavior with

@see AnMixinBehavior::getBehavior()

@return AnDomainBehaviorAbstract
Get a behavior by identifier .