private function setupEntryFilter($entryFilter)
    {
        if ($entryFilter == null) {
            return null;
        }

        if (is_string($entryFilter)) {
            $filter = new Filter\StringFilter($entryFilter);
        } elseif ($entryFilter instanceof AbstractFilter) {
            $filter = $entryFilter;
        } else {
            throw new InvalidArgumentException(
                sprintf(
                    'baseEntryFilter argument must be either instance of %s or string. %s given',
                    AbstractFilter::class,
                    gettype($entryFilter)
                )
            );
        }

        return $filter;
    }
private function setupEntryFilter($entryFilter)
    {
        if ($entryFilter == null) {
            return null;
        }

        if (is_string($entryFilter)) {
            $filter = new Filter\StringFilter($entryFilter);
        } elseif ($entryFilter instanceof AbstractFilter) {
            $filter = $entryFilter;
        } else {
            throw new InvalidArgumentException(
                sprintf(
                    'baseEntryFilter argument must be either instance of %s or string. %s given',
                    AbstractFilter::class,
                    gettype($entryFilter)
                )
            );
        }

        return $filter;
    }
private function setupEntryFilter ( $ entryFilter ) { if ( $ entryFilter == null ) { return null ; } if ( is_string ( $ entryFilter ) ) { $ filter = new Filter \ StringFilter ( $ entryFilter ) ; } elseif ( $ entryFilter instanceof AbstractFilter ) { $ filter = $ entryFilter ; } else { throw new InvalidArgumentException ( sprintf ( 'baseEntryFilter argument must be either instance of %s or string. %s given' , AbstractFilter :: class , gettype ( $ entryFilter ) ) ) ; } return $ filter ; }
Validates specified zend ldap filter and cast it to AbstractFilter implementation

@param string|AbstractFilter $entryFilter zend ldap filter

@return AbstractFilter|null

@throws InvalidArgumentException in case of invalid filter
Validates specified zend ldap filter and cast it to AbstractFilter implementation