Exemplo n.º 1
0
 function searchPerson($searchKey, $page = 0)
 {
     if ($page > 0) {
         $page = ($page - 1) * PAGE_BY;
         $limit = "LIMIT {$page}," . PAGE_BY;
     }
     $fields = array("firstName", "middleName", "lastName");
     $personRecords = new PersonRecords();
     if ($personRecords->searchRecords($searchKey, $fields, $limit)) {
         if (!($domDoc = $personRecords->getDomDocument())) {
             return false;
         } else {
             $xmlStr = $domDoc->dump_mem(true);
             return $xmlStr;
         }
     } else {
         return false;
     }
 }