/** * Visit this content. * @param IdmlVisitor $visitor * @param int $depth */ public function accept(IdmlVisitor $visitor, $depth = 0) { $visitor->visitPolygon($this, $depth); foreach ($this->childrenElements as $child) { $child->accept($visitor, $depth + 1); } }
/** * Accept visitor. * * @param IdmlVisitor $visitor */ public function accept(IdmlVisitor $visitor, $depth = 0) { $visitor->visitTableCell($this, $depth); foreach ($this->childrenElements as $child) { $child->accept($visitor, $depth + 1); } $visitor->visitTableCellEnd($this, $depth); }
/** * Accept visitor. * * @param IdmlVisitor $visitor */ public function accept(IdmlVisitor $visitor, $depth = 0) { // Group is also visitable just in case it can have a style. $visitor->visitTable($this, $depth); foreach ($this->childrenElements as $child) { $child->accept($visitor, $depth + 1); } $visitor->visitTableEnd($this, $depth); }
/** * Accept visitor. This element is not visited. * @param IdmlVisitor $visitor * @param int $depth */ public function accept(IdmlVisitor $visitor, $depth = 0) { // If item is visible then accept. if ($this->visible) { $visitor->visitRectangle($this, $depth); foreach ($this->childrenElements as $child) { $child->accept($visitor, $depth + 1); } $visitor->visitRectangleEnd($this, $depth); } }
/** * Accept visitor. * * @param IdmlVisitor $visitor * @param int $depth */ public function accept(IdmlVisitor $visitor, $depth = 0) { // Group is also visitable just in case it can have a style. $visitor->visitHyperlink($this, $depth); // The boolean $hyperlinkClosed is set to true if any child is an IdmlBrContent object. // Such an object will cause the producer to terminate this hyperlink and start a new paragraph. $hyperlinkClosed = false; foreach ($this->childrenElements as $child) { $child->accept($visitor, $depth + 1); if (is_a($child, 'IdmlBrContent')) { $hyperlinkClosed = true; } } if (!$hyperlinkClosed) { $visitor->visitHyperlinkEnd($this, $depth); } }
/** * Accept visitor. * * @param IdmlVisitor $visitor */ public function accept(IdmlVisitor $visitor, $depth = 0) { switch ($this->changeType) { case 'DeletedText': return; case 'InsertedText': case 'MovedText': $visitor->visitChange($this, $depth); foreach ($this->childrenElements as $child) { $child->accept($visitor, $depth + 1); } $visitor->visitChangeEnd($this, $depth); return; case 'undefined': default: CakeLog::debug("[IdmlChange::accept] Unexpected changeType '" . $this->changeType . "'"); return; } }
/** * Accept visitor. * * @param IdmlVisitor $visitor * @param int $depth */ public function accept(IdmlVisitor $visitor, $depth = 0) { $visitor->visitCharacterRange($this, $depth); foreach ($this->childrenElements as $child) { $child->accept($visitor, $depth + 1); } $visitor->visitCharacterRangeEnd($this, $depth); }
/** * Accept visitor. * * @param IdmlVisitor $visitor * @param int $depth */ public function accept(IdmlVisitor $visitor, $depth = 0) { $visitor->visitHyperlinkDestination($this, $depth); }
/** * Visit this content. * @param IdmlVisitor $visitor * @param int $depth */ public function accept(IdmlVisitor $visitor, $depth = 0) { $visitor->visitContent($this, $depth); // Produce the text and IDML processing instruction nodes foreach ($this->childrenElements as $child) { $child->accept($visitor, $depth + 1); } $visitor->visitContentEnd($this, $depth); }
public function accept(IdmlVisitor $visitor, $depth) { $visitor->visitSpread($this, $depth); foreach ($this->pages as $page) { $page->accept($visitor, $depth + 1); } $visitor->visitSpreadEnd($this, $depth); }
/** * Visit this content. * @param IdmlVisitor $visitor * @param int $depth */ public function accept(IdmlVisitor $visitor, $depth = 0) { $visitor->visitText($this, $depth); }
/** * @param string $content * @param IdmlElement $element * @param IdmlVisitor $producer * @param int $depth */ private function nestTabNode($content, $element, $producer, $depth = 0) { // Increment numFound if delimiter matches the nested style if ($this->delimType == 'node') { $this->numFound++; } if ($this->numFound < $this->numTimes || $this->numFound == $this->numTimes && $this->inclusive) { $producer->addPageElement('<span class="' . $this->charStyle . '">', $depth); $producer->processTab($element, $content, $depth); $producer->addPageElement('</span>', $depth); } else { $producer->processTab($element, $content, $depth); } }
/** * Visit this content. * @param IdmlVisitor $visitor * @param int $depth */ public function accept(IdmlVisitor $visitor, $depth = 0) { $visitor->visitTextVariableInstance($this, $depth); }
public function accept(IdmlVisitor $visitor, $depth) { $visitor->visitTags($this, $depth); }
public function accept(IdmlVisitor $visitor, $depth) { $visitor->visitStory($this, $depth); foreach ($this->childrenElements as $element) { $element->accept($visitor, $depth + 1); } $visitor->visitStoryEnd($this, $depth); }
/** * Visit this processing instruction. * @param IdmlVisitor $visitor * @param int $depth */ public function accept(IdmlVisitor $visitor, $depth = 0) { $visitor->visitProcessingInstruction($this, $depth); }
/** * Accept visitor. * * @param IdmlVisitor $visitor * @param int $depth */ public function accept(IdmlVisitor $visitor, $depth = 0) { if ($this->visible) { // IdmlImage cannot have children. $visitor->visitImage($this, $depth); } }
/** * Accept visitor. This element is not visited. * @param IdmlVisitor $visitor * @param int $depth */ public function accept(IdmlVisitor $visitor, $depth = 0) { $visitor->visitMedia($this, $depth); // There are not likely to be any children; i've left this here to be safe -bt foreach ($this->childrenElements as $child) { $child->accept($visitor, $depth + 1); } }
/** * This accept function is called by the parent IdmlSpread. * * @param IdmlVisitor $visitor * @param $depth is how deep in the traversal we are */ public function accept(IdmlVisitor $visitor, $depth) { // Skip the page in case it does not have any children elements. if (IdmlAssembler::getInstance()->isReflowable()) { if (count($this->childrenElements) == 0 || $this->hasOnlyEmptyTextFrames()) { return; } } $visitor->visitPage($this, $depth); // First walk the elements of the associated master spread. if (IdmlAssembler::getInstance()->isFixedLayout()) { $this->visitMasterPageItems($visitor, $this->inDesignPageName, $depth + 1); } // Then walk the elements of this page itself foreach ($this->childrenElements as $childElement) { $childElement->accept($visitor, $depth + 1); } $visitor->visitPageEnd($this, $depth); }
public function accept(IdmlVisitor $visitor, $depth = 0) { $visitor->visitAssembler($this, $depth); for ($i = 0; $i < count($this->idmlPackages); $i++) { $this->currentIDMLPackageIndex = $i; // this is needed by getCurrentPackage() $this->idmlPackages[$i]->accept($visitor, $depth + 1); } // Replace hyperlink hrefs $visitor->fixHyperlinkPageNames($this->processor->epub); $visitor->visitAssemblerEnd($this, $depth); }
public function accept(IdmlVisitor $visitor, $depth) { $visitor->visitPackage($this, $depth); // DEBUG only: This will produce a single page per masterspread page /* foreach($this->masterSpreads as $masterSpread) { if (IdmlAssembler::getInstance()->isFixedLayout()) $masterSpread->accept($visitor, $depth+1); } */ // end DEBUG foreach ($this->spreads as $spread) { $spread->accept($visitor, $depth + 1); } $visitor->visitPackageEnd($this, $depth); }
/** * Accept visitor. * * @param IdmlVisitor $visitor * @param int $depth */ public function accept(IdmlVisitor $visitor, $depth = 0) { $visitor->visitParagraphRange($this, $depth); // Reset the tab index to zero; this property is used to determine when the last tab on a row is reached. $this->tabIndex = 0; foreach ($this->childrenElements as $child) { $child->accept($visitor, $depth + 1); } $visitor->visitParagraphRangeEnd($this, $depth); }
/** * Accept visitor. * * @param IdmlVisitor $visitor */ public function accept(IdmlVisitor $visitor, $depth = 0) { // The idmlStory will be null for text frames that contain a story that was already placed in another text frame. // Do not process those text frames. if ($this->story && $this->visible) { if ($this->isEmbedded()) { $visitor->visitEmbeddedTextFrame($this, $depth); } else { $visitor->visitTextFrame($this, $depth); $this->story->accept($visitor, $depth + 1); $visitor->visitTextFrameEnd($this, $depth); } } }
/** * Visit this content. * @param IdmlVisitor $visitor * @param int $depth */ public function accept(IdmlVisitor $visitor, $depth = 0) { $visitor->visitGraphicLine($this, $depth); }