/** * 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(); }