public function allFromAdapter(Adapter $adapter)
    {
        if ($adapter instanceof KnowsItsBehaviors) {
            return $adapter->getBehaviors();
        }

        $rfl       = new \ReflectionClass($adapter);
        $behaviors = array();

        foreach ($rfl->getInterfaces() as $interface) {
            if (true === $interface->isSubclassOf('Gaufrette\Core\Adapter\Behavior')) {
                $behaviors[] = $interface->getName();
            }
        }

        return $behaviors;
    }
public function allFromAdapter(Adapter $adapter)
    {
        if ($adapter instanceof KnowsItsBehaviors) {
            return $adapter->getBehaviors();
        }

        $rfl       = new \ReflectionClass($adapter);
        $behaviors = array();

        foreach ($rfl->getInterfaces() as $interface) {
            if (true === $interface->isSubclassOf('Gaufrette\Core\Adapter\Behavior')) {
                $behaviors[] = $interface->getName();
            }
        }

        return $behaviors;
    }
public function allFromAdapter ( Adapter $ adapter ) { if ( $ adapter instanceof KnowsItsBehaviors ) { return $ adapter -> getBehaviors ( ) ; } $ rfl = new \ ReflectionClass ( $ adapter ) ; $ behaviors = array ( ) ; foreach ( $ rfl -> getInterfaces ( ) as $ interface ) { if ( true === $ interface -> isSubclassOf ( 'Gaufrette\Core\Adapter\Behavior' ) ) { $ behaviors [ ] = $ interface -> getName ( ) ; } } return $ behaviors ; }
Get all behavior of an adapter.

@param Adapter $adapter

@return string[]
Get all behavior of an adapter .