public function getBehavior($name)
    {
        if (false !== strpos($name, '\\')) {
            $class = $name;
        } else {
            $class = $this->getCoreBehavior($name);

            if (!class_exists($class)) {
                $behaviors = $this->getBehaviors();
                if (array_key_exists($name, $behaviors)) {
                    $class = $behaviors[$name]['class'];
                }
            }
        }

        if (!class_exists($class)) {
            throw new BehaviorNotFoundException(sprintf('Unknown behavior "%s". You may try running `composer update` or passing the `--composer-dir` option.', $name));
        }

        return $class;
    }
public function getBehavior($name)
    {
        if (false !== strpos($name, '\\')) {
            $class = $name;
        } else {
            $class = $this->getCoreBehavior($name);

            if (!class_exists($class)) {
                $behaviors = $this->getBehaviors();
                if (array_key_exists($name, $behaviors)) {
                    $class = $behaviors[$name]['class'];
                }
            }
        }

        if (!class_exists($class)) {
            throw new BehaviorNotFoundException(sprintf('Unknown behavior "%s". You may try running `composer update` or passing the `--composer-dir` option.', $name));
        }

        return $class;
    }
public function getBehavior ( $ name ) { if ( false !== strpos ( $ name , '\\' ) ) { $ class = $ name ; } else { $ class = $ this -> getCoreBehavior ( $ name ) ; if ( ! class_exists ( $ class ) ) { $ behaviors = $ this -> getBehaviors ( ) ; if ( array_key_exists ( $ name , $ behaviors ) ) { $ class = $ behaviors [ $ name ] [ 'class' ] ; } } } if ( ! class_exists ( $ class ) ) { throw new BehaviorNotFoundException ( sprintf ( 'Unknown behavior "%s". You may try running `composer update` or passing the `--composer-dir` option.' , $ name ) ) ; } return $ class ; }
Returns the class name for a given behavior name

@param  string                    $name The behavior name (e.g. timetampable)
@throws BehaviorNotFoundException when the behavior cannot be found
@return string                    the class name
Returns the class name for a given behavior name