. * */ namespace OCA\Contacts\Search; /** * The updated contacts search provider */ class Provider extends \OC\Search\Provider { /** * Search for contacts * * @param string $query * @return array list of \OCA\Calendar\Search\Contact */ function search($query) { $_results = \OCP\Contacts::search($query, array('N', 'FN', 'EMAIL', 'NICKNAME', 'ORG')); $results = array(); foreach ($_results as $_result) { $results[] = new \OCA\Contacts\Search\Contact($_result); } return $results; } }