Library/Bullhorn/FastRest/Api/Models/Base.php
public function getAllBehaviorsByClassName($className) {
        $modelsManager = $this->getModelsManager();

        $reflectionClass = new \ReflectionClass($modelsManager);
        $reflectionBehavior = $reflectionClass->getProperty('_behaviors');
        $reflectionBehavior->setAccessible(true);
        /** @var array $allBehaviors */
        $allBehaviors = $reflectionBehavior->getValue($modelsManager);
        /** @var Model\BehaviorInterface[] $behaviors */
        $behaviors = $allBehaviors[strtolower(get_class($this))];

        /** @var Model\BehaviorInterface[] $returnVar */
        $returnVar = [];
        foreach($behaviors as $behavior) {
            if(get_class($behavior) == $className || is_subclass_of($behavior, $className)) {
                $returnVar[] = $behavior;
            }
        }

        return $returnVar;
    }
public function getAllBehaviorsByClassName($className) {
        $modelsManager = $this->getModelsManager();

        $reflectionClass = new \ReflectionClass($modelsManager);
        $reflectionBehavior = $reflectionClass->getProperty('_behaviors');
        $reflectionBehavior->setAccessible(true);
        /** @var array $allBehaviors */
        $allBehaviors = $reflectionBehavior->getValue($modelsManager);
        /** @var Model\BehaviorInterface[] $behaviors */
        $behaviors = $allBehaviors[strtolower(get_class($this))];

        /** @var Model\BehaviorInterface[] $returnVar */
        $returnVar = [];
        foreach($behaviors as $behavior) {
            if(get_class($behavior) == $className || is_subclass_of($behavior, $className)) {
                $returnVar[] = $behavior;
            }
        }

        return $returnVar;
    }
public function getAllBehaviorsByClassName ( $ className ) { $ modelsManager = $ this -> getModelsManager ( ) ; $ reflectionClass = new \ ReflectionClass ( $ modelsManager ) ; $ reflectionBehavior = $ reflectionClass -> getProperty ( '_behaviors' ) ; $ reflectionBehavior -> setAccessible ( true ) ; /** @var array $allBehaviors */ $ allBehaviors = $ reflectionBehavior -> getValue ( $ modelsManager ) ; /** @var Model\BehaviorInterface[] $behaviors */ $ behaviors = $ allBehaviors [ strtolower ( get_class ( $ this ) ) ] ; /** @var Model\BehaviorInterface[] $returnVar */ $ returnVar = [ ] ; foreach ( $ behaviors as $ behavior ) { if ( get_class ( $ behavior ) == $ className || is_subclass_of ( $ behavior , $ className ) ) { $ returnVar [ ] = $ behavior ; } } return $ returnVar ; }
Returns all behaviors associated with the class

@param string $className

@return Model\BehaviorInterface[]
Returns all behaviors associated with the class