Exemple #1
0
 /**
  * Return all entries matching the combined searches represented by
  * $criteria and the vitural address book's search criteria.
  *
  * @param array $criteria  Array containing the search criteria.
  * @param array $fields    List of fields to return
  * @param array $blobFileds  Array of fields that contain
  *
  * @return array  Hash containing the search results.
  * @throws Turba_Exception
  */
 protected function _search(array $criteria, array $fields, array $blobFields = array(), $count_only = false)
 {
     /* Add the passed in search criteria to the vbook criteria
      * (which need to be mapped from turba fields to
      * driver-specific fields). */
     $criteria['AND'][] = $this->makeSearch($this->searchCriteria, 'AND', array());
     $results = $this->_driver->_search($criteria, $fields, $blobFields);
     return $count_only ? count($results) : $results;
 }
Exemple #2
0
 /**
  * Searches the address book with the given criteria and returns a
  * filtered list of results. If the criteria parameter is an empty array,
  * all records will be returned.
  *
  * @param array $criteria       Array containing the search criteria.
  * @param array $fields         List of fields to return.
  * @param array $blobFields     Array of fields containing binary data.
  * @param boolean $count_only   Only return the count of matching entries,
  *                              not the entries themselves.
  *
  * @return array  Hash containing the search results.
  * @throws Turba_Exception
  */
 protected function _search(array $criteria, array $fields, array $blobFields = array(), $count_only = false)
 {
     return $this->_driver->_search($criteria, $fields, $blobFields, $count_only);
 }