lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php
public function addFilterToPreparedQuery(array $preparedQuery)
    {
        /* If filter criteria exists for this class, prepare it and merge
         * over the existing query.
         *
         * @todo Consider recursive merging in case the filter criteria and
         * prepared query both contain top-level $and/$or operators.
         */
        if ($filterCriteria = $this->dm->getFilterCollection()->getFilterCriteria($this->class)) {
            $preparedQuery = $this->cm->merge($preparedQuery, $this->prepareQueryOrNewObj($filterCriteria));
        }

        return $preparedQuery;
    }
public function addFilterToPreparedQuery(array $preparedQuery)
    {
        /* If filter criteria exists for this class, prepare it and merge
         * over the existing query.
         *
         * @todo Consider recursive merging in case the filter criteria and
         * prepared query both contain top-level $and/$or operators.
         */
        if ($filterCriteria = $this->dm->getFilterCollection()->getFilterCriteria($this->class)) {
            $preparedQuery = $this->cm->merge($preparedQuery, $this->prepareQueryOrNewObj($filterCriteria));
        }

        return $preparedQuery;
    }
public function addFilterToPreparedQuery ( array $ preparedQuery ) { /* If filter criteria exists for this class, prepare it and merge
         * over the existing query.
         *
         * @todo Consider recursive merging in case the filter criteria and
         * prepared query both contain top-level $and/$or operators.
         */ if ( $ filterCriteria = $ this -> dm -> getFilterCollection ( ) -> getFilterCriteria ( $ this -> class ) ) { $ preparedQuery = $ this -> cm -> merge ( $ preparedQuery , $ this -> prepareQueryOrNewObj ( $ filterCriteria ) ) ; } return $ preparedQuery ; }
Adds filter criteria to an already-prepared query.

This method should be used once for query criteria and not be used for
nested expressions. It should be called after
{@link DocumentPerister::addDiscriminatorToPreparedQuery()}.

@param array $preparedQuery
@return array
Adds filter criteria to an already - prepared query .