.scripts/contentdm.php
/**
   * Step 1 - Retrieve Results.
   *
   * Queries a wild-card search to CONTENTdm and grabs all results. In the
   * event that there are more than the maximum records within a collection,
   * a loop will run until all records are returned.
   */
Step 1 - Retrieve Results.
Queries a wild-card search to CONTENTdm and grabs all results. In the
event that there are more than the maximum records within a collection,
a loop will run until all records are returned.
Step 1 - Retrieve Results . Queries a wild - card search to CONTENTdm and grabs all results . In the event that there are more than the maximum records within a collection a loop will run until all records are returned .
public function retrieveResults() {
    $this->logger("Retrieving results.");
    $start   = 0;
    $results = array();
    if ($this->collection === "kmc") {
      $results = array("date", "title");
    } else {
      $results = array("contri", "covera", "date", "descri", "media", "publis", "relati", "subjec", "title", "transc");
    }
    $this->content = $this->acquireContent($results, $start);
    while (($this->content["pager"]["maxrecs"] + $start) < $this->content["pager"]["total"]) {
      $start += 1024;
      $acquire = $this->acquireContent($results, $start);
      array_shift($acquire["records"]);
      $this->content["records"] = array_merge_recursive($this->content["records"], $acquire["records"]);
    }
  }
public function retrieveResults ( ) { $ this -> logger ( " Retrieving results. " ) ; $ start = 0 ; $ results = array ( ) ; if ( $ this -> collection === " kmc " ) { $ results = array ( " date " , " title " ) ; } else { $ results = array ( " contri " , " covera " , " date " , " descri " , " media " , " publis " , " relati " , " subjec " , " title " , " transc " ) ; } $ this -> content = $ this -> acquireContent ( $ results , $ start ) ; while ( ( $ this -> content [ " pager " ] [ " maxrecs " ] + $ start ) < $ this -> content [ " pager " ] [ " total " ] ) { $ start += 1024 ; $ acquire = $ this -> acquireContent ( $ results , $ start ) ; array_shift ( $ acquire [ " records " ] ) ; $ this -> content [ " records " ] = array_merge_recursive ( $ this -> content [ " records " ] , $ acquire [ " records " ] ) ; } }
Step 1 - Retrieve Results.
Step 1 - Retrieve Results .
// Start on the zero-indexed record. // In the event there are more than the maximum 1,024 manuscripts returned. // Increasing by 1025 to remove the future `array_shift` causes math // problems, and since math is hard, this will have to do. // The first of the current is the same as the last of the previous. // Merge only the records together.