public function getBehavior($name)
    {
        /** @var \Cake\ORM\Behavior $behavior */
        $behavior = $this->_behaviors->get($name);
        if ($behavior === null) {
            throw new InvalidArgumentException(sprintf(
                'The %s behavior is not defined on %s.',
                $name,
                get_class($this)
            ));
        }

        return $behavior;
    }
public function getBehavior($name)
    {
        /** @var \Cake\ORM\Behavior $behavior */
        $behavior = $this->_behaviors->get($name);
        if ($behavior === null) {
            throw new InvalidArgumentException(sprintf(
                'The %s behavior is not defined on %s.',
                $name,
                get_class($this)
            ));
        }

        return $behavior;
    }
public function getBehavior ( $ name ) { /** @var \Cake\ORM\Behavior $behavior */ $ behavior = $ this -> _behaviors -> get ( $ name ) ; if ( $ behavior === null ) { throw new InvalidArgumentException ( sprintf ( 'The %s behavior is not defined on %s.' , $ name , get_class ( $ this ) ) ) ; } return $ behavior ; }
Get a behavior from the registry.

@param string $name The behavior alias to get from the registry.
@return \Cake\ORM\Behavior
@throws \InvalidArgumentException If the behavior does not exist.
Get a behavior from the registry .