includes/manuscript-viewer-helper.php
/**
   * Printer
   *
   * Prints all data necessary for js/hsn-book-reader.js
   *
   * It runs through each pointer within the compound object, grabs its
   * information, and then appends it all into an array for JavaScript to
   * deal with.
   *
   * @return Array
   */
Printer
Prints all data necessary for js/hsn-book-reader.js

It runs through each pointer within the compound object, grabs its
information, and then appends it all into an array for JavaScript to
deal with.

@return Array
Printer Prints all data necessary for js / hsn - book - reader . js It runs through each pointer within the compound object grabs its information and then appends it all into an array for JavaScript to deal with . @return Array
public function printData() {
    $parent = new Helper($this->parent, $this->collection);
    $return = array(
      "pages"  => $this->pages,
      "title"  => $parent->retrieveTitle(),
      "images" => array()
    );
    for ($i = 0; $i < count($this->compound); $i++) {
      $item = $this->compound[$i];
      if ($item["pointer"] === $this->pointer) {
        $return["images"][$i] = array(
          "width"  => $this->getImageWidth(),
          "height" => $this->getImageHeight()
        );
        continue;
      }
      $helper = new Helper($item["pointer"], $this->collection);
      $return["images"][$i] = array(
        "width"  => $helper->getImageWidth(),
        "height" => $helper->getImageHeight()
      );
    }
    return $return;
  }
public function printData ( ) { $ parent = new Helper ( $ this -> parent , $ this -> collection ) ; $ return = array ( " pages " => $ this -> pages , " title " => $ parent -> retrieveTitle ( ) , " images " => array ( ) ) ; for ( $ i = 0 ; $ i < count ( $ this -> compound ) ; $ i ++ ) { $ item = $ this -> compound [ $ i ] ; if ( $ item [ " pointer " ] === $ this -> pointer ) { $ return [ " images " ] [ $ i ] = array ( " width " => $ this -> getImageWidth ( ) , " height " => $ this -> getImageHeight ( ) ) ; continue ; } $ helper = new Helper ( $ item [ " pointer " ] , $ this -> collection ) ; $ return [ " images " ] [ $ i ] = array ( " width " => $ helper -> getImageWidth ( ) , " height " => $ helper -> getImageHeight ( ) ) ; } return $ return ; }
Printer
 Prints all data necessary for js/hsn-book-reader.js
Printer Prints all data necessary for js / hsn - book - reader . js
// Run through each pointer. // If we're on the same item, do not create a new class. // Otherwise, create a temp class.