Exemplo n.º 1
0
 /**
  * Initialize this instance.
  * 
  * @param IdmlProcessor $processor
  * @return None
  */
 public function init(IdmlProcessor $processor = null)
 {
     $this->processor = $processor;
     if ($processor) {
         $this->progressUpdater = ProgressUpdater::getInstance($processor->bookId);
         $this->FileManager = new FileManager($processor->bookId);
         $this->resourceManager = new IdmlResourceManager($processor, $this->FileManager);
     } else {
         $this->progressUpdater = null;
         $this->resourceManager = null;
         $this->FileManager = null;
     }
     $this->idmlPackages = array();
     $this->styles = array();
     $this->numPages = 0;
     $this->actualPages = 0;
     $this->pageProgression = 'left-to-right';
     $this->facingPages = true;
     $this->currentIDMLFileIndex = 0;
     $this->currentIDMLPackageIndex = 0;
     //set this as default for unit testing purposes
     IdmlDeclarationManager::resetInstance();
 }
Exemplo n.º 2
0
 public function initProgress($numSteps = 2000)
 {
     if ($this->progressBookId) {
         $this->progress = ProgressUpdater::getInstance($this->progressBookId);
     } else {
         $this->progress = ProgressUpdater::getInstance($this->bookId);
     }
     $this->progress->completedState = $this->completedState;
     $this->progress->startProgress($numSteps);
 }