private function isSearchQuery(array $criteria)
    {
        if (isset($criteria['$text'])) {
            return true;
        }
        foreach ($criteria as $key => $value) {
            if (is_array($value) && true === $this->isSearchQuery($value)) {
                return true;
            }
        }
        return false;
    }
private function isSearchQuery(array $criteria)
    {
        if (isset($criteria['$text'])) {
            return true;
        }
        foreach ($criteria as $key => $value) {
            if (is_array($value) && true === $this->isSearchQuery($value)) {
                return true;
            }
        }
        return false;
    }
private function isSearchQuery ( array $ criteria ) { if ( isset ( $ criteria [ '$text' ] ) ) { return true ; } foreach ( $ criteria as $ key => $ value ) { if ( is_array ( $ value ) && true === $ this -> isSearchQuery ( $ value ) ) { return true ; } } return false ; }
Determines if the provided query criteria contains text search.

@param   array   $criteria
@return  bool
Determines if the provided query criteria contains text search .