Пример #1
0
 /**
  * @param string $content
  * @param IdmlElement $element
  * @param IdmlVisitor $producer
  * @param int $depth
  */
 private function nestPINode($content, $element, $producer, $depth = 0)
 {
     // Increment numFound if delimiter matches the nested style
     if ($this->delimType == 'pi' && $content == $this->instrVal) {
         $this->numFound++;
     }
     if ($this->numFound < $this->numTimes || $this->numFound == $this->numTimes && $this->inclusive) {
         $producer->addPageElement('<span class="' . $this->charStyle . '">', $depth);
         $producer->visitProcessingInstructionCases($element, $content, $depth);
         $producer->addPageElement('</span>', $depth);
     } else {
         $producer->visitProcessingInstructionCases($element, $content, $depth);
     }
 }