private function readCustomOperatorsFromAnnotation(ReflectionClass $class): void
    {
        $allFilters = Utils::getRecursiveClassAnnotations($this->getAnnotationReader(), $class, Filters::class);
        $this->customOperators = [];
        foreach ($allFilters as $classWithAnnotation => $filters) {

            /** @var Filter $filter */
            foreach ($filters->filters as $filter) {
                $className = $filter->operator;
                $this->throwIfInvalidAnnotation($classWithAnnotation, 'Filter', AbstractOperator::class, $className);

                if (!isset($this->customOperators[$filter->field])) {
                    $this->customOperators[$filter->field] = [];
                }
                $this->customOperators[$filter->field][] = $filter;
            }
        }
    }
private function readCustomOperatorsFromAnnotation(ReflectionClass $class): void
    {
        $allFilters = Utils::getRecursiveClassAnnotations($this->getAnnotationReader(), $class, Filters::class);
        $this->customOperators = [];
        foreach ($allFilters as $classWithAnnotation => $filters) {

            /** @var Filter $filter */
            foreach ($filters->filters as $filter) {
                $className = $filter->operator;
                $this->throwIfInvalidAnnotation($classWithAnnotation, 'Filter', AbstractOperator::class, $className);

                if (!isset($this->customOperators[$filter->field])) {
                    $this->customOperators[$filter->field] = [];
                }
                $this->customOperators[$filter->field][] = $filter;
            }
        }
    }
private function readCustomOperatorsFromAnnotation ( ReflectionClass $ class ) : void { $ allFilters = Utils :: getRecursiveClassAnnotations ( $ this -> getAnnotationReader ( ) , $ class , Filters :: class ) ; $ this -> customOperators = [ ] ; foreach ( $ allFilters as $ classWithAnnotation => $ filters ) { /** @var Filter $filter */ foreach ( $ filters -> filters as $ filter ) { $ className = $ filter -> operator ; $ this -> throwIfInvalidAnnotation ( $ classWithAnnotation , 'Filter' , AbstractOperator :: class , $ className ) ; if ( ! isset ( $ this -> customOperators [ $ filter -> field ] ) ) { $ this -> customOperators [ $ filter -> field ] = [ ] ; } $ this -> customOperators [ $ filter -> field ] [ ] = $ filter ; } } }
Get the custom operators declared on the class via annotations indexed by their field name

@param ReflectionClass $class
Get the custom operators declared on the class via annotations indexed by their field name