src/Graviton/RestBundle/Restriction/Manager.php
private function getHandlerValue(DocumentRepository $repository, $fieldPath, array $handlers)
    {
        $nodes = [];
        foreach ($handlers as $handler) {
            if (!self::$handlers[$handler] instanceof HandlerInterface) {
                throw new \LogicException(
                    'Specified handler "'.$handler.'" is not registered with RestrictionManager!'
                );
            }
            $value = self::$handlers[$handler]->getValue($repository, $fieldPath);

            if (!$value instanceof AbstractQueryNode) {
                $value = new EqNode($fieldPath, $value);
            }

            $nodes[] = $value;
        }

        return $nodes;
    }
private function getHandlerValue(DocumentRepository $repository, $fieldPath, array $handlers)
    {
        $nodes = [];
        foreach ($handlers as $handler) {
            if (!self::$handlers[$handler] instanceof HandlerInterface) {
                throw new \LogicException(
                    'Specified handler "'.$handler.'" is not registered with RestrictionManager!'
                );
            }
            $value = self::$handlers[$handler]->getValue($repository, $fieldPath);

            if (!$value instanceof AbstractQueryNode) {
                $value = new EqNode($fieldPath, $value);
            }

            $nodes[] = $value;
        }

        return $nodes;
    }
private function getHandlerValue ( DocumentRepository $ repository , $ fieldPath , array $ handlers ) { $ nodes = [ ] ; foreach ( $ handlers as $ handler ) { if ( ! self :: $ handlers [ $ handler ] instanceof HandlerInterface ) { throw new \ LogicException ( 'Specified handler "' . $ handler . '" is not registered with RestrictionManager!' ) ; } $ value = self :: $ handlers [ $ handler ] -> getValue ( $ repository , $ fieldPath ) ; if ( ! $ value instanceof AbstractQueryNode ) { $ value = new EqNode ( $ fieldPath , $ value ) ; } $ nodes [ ] = $ value ; } return $ nodes ; }
gets the value to restrict data. the handler can also return a AbstractQueryNode. not only a string

@param DocumentRepository $repository the repository
@param string             $fieldPath  path to the field (can be complex; same syntax as in rql!)
@param array              $handlers   the specified handlers (array with handler names)

@return array the rql nodes
gets the value to restrict data . the handler can also return a AbstractQueryNode . not only a string