protected function getActiveRecordCriteriaByName($serviceLocator, $name)
    {
        $criteria = $serviceLocator->get($name);
        if (!$criteria instanceof AbstractCriteria) {
            throw new Exception\ServiceNotCreatedException(sprintf(
                'Instance of type %s is invalid; must implement %s',
                (is_object($criteria) ? get_class($criteria) : gettype($criteria)),
                AbstractCriteria::class
            ));
        }
        return $criteria;
    }
protected function getActiveRecordCriteriaByName($serviceLocator, $name)
    {
        $criteria = $serviceLocator->get($name);
        if (!$criteria instanceof AbstractCriteria) {
            throw new Exception\ServiceNotCreatedException(sprintf(
                'Instance of type %s is invalid; must implement %s',
                (is_object($criteria) ? get_class($criteria) : gettype($criteria)),
                AbstractCriteria::class
            ));
        }
        return $criteria;
    }
protected function getActiveRecordCriteriaByName ( $ serviceLocator , $ name ) { $ criteria = $ serviceLocator -> get ( $ name ) ; if ( ! $ criteria instanceof AbstractCriteria ) { throw new Exception \ ServiceNotCreatedException ( sprintf ( 'Instance of type %s is invalid; must implement %s' , ( is_object ( $ criteria ) ? get_class ( $ criteria ) : gettype ( $ criteria ) ) , AbstractCriteria :: class ) ) ; } return $ criteria ; }
Retrieve PaginableCriteriaInterface object from config

@param ServiceLocatorInterface $serviceLocator
@param $name
@return AbstractCriteria
@throws Exception\ServiceNotCreatedException
Retrieve PaginableCriteriaInterface object from config