Exemple #1
0
 /**
  * Holdings look-up, via AJAX
  */
 public function lookup()
 {
     $standard_numbers = array();
     $id = $this->request->getProperty("id");
     if ($id != null) {
         array_push($standard_numbers, $id);
     } else {
         $isbn = $this->request->getProperty("isbn");
         $oclc = $this->request->getProperty("oclc");
         if ($oclc != null) {
             array_push($standard_numbers, "OCLC:{$oclc}");
         }
         if ($isbn != null) {
             array_push($standard_numbers, "ISBN:{$isbn}");
         }
     }
     $items = $this->getHoldings($standard_numbers);
     $xerxes_record = new Xerxes_Record();
     $xerxes_record->addItems($items);
     $this->request->addDocument($xerxes_record->toXML());
 }