protected function _loadCollection($name)
    {
        if ($name === self::DEFAULT_COLLECTION) {
            $class = $this->_collectionClass;
        } else {
            $class = Inflector::camelize(str_replace('-', '_', $name));
        }

        $className = App::className($class, 'Model/Filter', 'Collection');
        if (!$className) {
            throw new InvalidArgumentException(sprintf(
                'The collection class "%sCollection" does not exist',
                $class
            ));
        }

        $instance = new $className($this);
        if (!$instance instanceof FilterCollectionInterface) {
            throw new InvalidArgumentException(sprintf(
                'The collection must be instance of FilterCollectionInterface. ' .
                'Got instance of "%s" instead',
                get_class($instance)
            ));
        }

        return $instance;
    }
protected function _loadCollection($name)
    {
        if ($name === self::DEFAULT_COLLECTION) {
            $class = $this->_collectionClass;
        } else {
            $class = Inflector::camelize(str_replace('-', '_', $name));
        }

        $className = App::className($class, 'Model/Filter', 'Collection');
        if (!$className) {
            throw new InvalidArgumentException(sprintf(
                'The collection class "%sCollection" does not exist',
                $class
            ));
        }

        $instance = new $className($this);
        if (!$instance instanceof FilterCollectionInterface) {
            throw new InvalidArgumentException(sprintf(
                'The collection must be instance of FilterCollectionInterface. ' .
                'Got instance of "%s" instead',
                get_class($instance)
            ));
        }

        return $instance;
    }
protected function _loadCollection ( $ name ) { if ( $ name === self :: DEFAULT_COLLECTION ) { $ class = $ this -> _collectionClass ; } else { $ class = Inflector :: camelize ( str_replace ( '-' , '_' , $ name ) ) ; } $ className = App :: className ( $ class , 'Model/Filter' , 'Collection' ) ; if ( ! $ className ) { throw new InvalidArgumentException ( sprintf ( 'The collection class "%sCollection" does not exist' , $ class ) ) ; } $ instance = new $ className ( $ this ) ; if ( ! $ instance instanceof FilterCollectionInterface ) { throw new InvalidArgumentException ( sprintf ( 'The collection must be instance of FilterCollectionInterface. ' . 'Got instance of "%s" instead' , get_class ( $ instance ) ) ) ; } return $ instance ; }
Loads a filter collection.

@param string $name Collection name or FQCN.
@return \Search\Model\Filter\FilterCollectionInterface
@throws \InvalidArgumentException When no filter was found.
Loads a filter collection .