.scripts/contentdm.php
/**
   * Step 3.x.1 - Compound Object Page Retriever
   *
   * Determines what page the given record is within its compound object
   * information. This will start numbering at 0.
   *
   * Returning a -1 indicates that the item itself is a compound object, and
   * therefore does not have a page, or it is not a compound object. Either
   * way, the manuscript does not have page number.
   *
   * @param  Array $record -- The manuscript.
   * @return Array
   */
Step 3.x.1 - Compound Object Page Retriever
Determines what page the given record is within its compound object
information. This will start numbering at 0.

Returning a -1 indicates that the item itself is a compound object, and
therefore does not have a page, or it is not a compound object. Either
way, the manuscript does not have page number.

@param  Array $record -- The manuscript.
@return Array
Step 3 . x . 1 - Compound Object Page Retriever Determines what page the given record is within its compound object information . This will start numbering at 0 . Returning a - 1 indicates that the item itself is a compound object and therefore does not have a page or it is not a compound object . Either way the manuscript does not have page number . @param Array $record -- The manuscript . @return Array
private function retrieveCompoundPage($record) {
    $pointer = $record["pointer"];
    $this->logger("Retrieving the page location for " . $pointer);
    $remote = json_decode(file_get_contents($this->constructParameterURL("dmGetCompoundObjectInfo", $pointer)), true);
    if (array_key_exists("message", $remote)) {
      $parent = $record["parent_object"];
      $remote = json_decode(file_get_contents($this->constructParameterURL("dmGetCompoundObjectInfo", $parent)), true);
    } else {
      return array(":compound_page" => (string) -1);
    }
    if (!array_key_exists("page", $remote)) {
      return array(":compound_page" => (string) -1);
    }
    foreach ($remote["page"] as $key=>$page) {
      if ($page["pageptr"] === $pointer) {
        return array(":compound_page" => (string) $key);
      }
    }
  }
private function retrieveCompoundPage ( $ record ) { $ pointer = $ record [ " pointer " ] ; $ this -> logger ( " Retrieving the page location for  " . $ pointer ) ; $ remote = json_decode ( file_get_contents ( $ this -> constructParameterURL ( " dmGetCompoundObjectInfo " , $ pointer ) ) , true ) ; if ( array_key_exists ( " message " , $ remote ) ) { $ parent = $ record [ " parent_object " ] ; $ remote = json_decode ( file_get_contents ( $ this -> constructParameterURL ( " dmGetCompoundObjectInfo " , $ parent ) ) , true ) ; } else { return array ( " :compound_page " => ( string ) - 1 ) ; } if ( ! array_key_exists ( " page " , $ remote ) ) { return array ( " :compound_page " => ( string ) - 1 ) ; } foreach ( $ remote [ " page " ] as $ key => $ page ) { if ( $ page [ " pageptr " ] === $ pointer ) { return array ( " :compound_page " => ( string ) $ key ) ; } } }
Step 3.x.1 - Compound Object Page Retriever
 Determines what page the given record is within its compound object
 information.
Step 3 . x . 1 - Compound Object Page Retriever Determines what page the given record is within its compound object information .
// Assume it is the compound object. // Assume it is not a compound object at all.