Texy\HtmlElement::getChildren PHP Method

getChildren() final public method

return array
final public getChildren ( )
    public final function getChildren()
    {
        return $this->children;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Parse text in all cells.
  * @return void
  */
 private function finishPart(HtmlElement $elPart)
 {
     foreach ($elPart->getChildren() as $elRow) {
         foreach ($elRow->getChildren() as $elCell) {
             if ($elCell->colSpan > 1) {
                 $elCell->attrs['colspan'] = $elCell->colSpan;
             }
             if ($elCell->rowSpan > 1) {
                 $elCell->attrs['rowspan'] = $elCell->rowSpan;
             }
             $text = rtrim($elCell->text);
             if (strpos($text, "\n") !== FALSE) {
                 // multiline parse as block
                 // HACK: disable tables
                 $this->disableTables = TRUE;
                 $elCell->parseBlock($this->texy, Texy\Helpers::outdent($text));
                 $this->disableTables = FALSE;
             } else {
                 $elCell->parseLine($this->texy, ltrim($text));
             }
             if ($elCell->getText() === '') {
                 $elCell->setText(" ");
                 //  
             }
         }
     }
 }