private static function internalFindPiconTag(MarkupElement $markup, $type) { if ($markup instanceof PiconTag && $markup->getName() == 'picon:' . $type) { return $markup; } else { if ($markup->hasChildren()) { $piconTag = null; foreach ($markup->getChildren() as $element) { if ($element instanceof MarkupElement) { $piconTag = self::internalFindPiconTag($element, $type); if ($piconTag != null) { return $piconTag; } } } } return null; } }
/** * Renders the close tag (if needed) for the element * @param MarkupElement The markup element to be rendered */ private final function renderElementEnd(MarkupElement $element) { if ($element->isOpen()) { $this->getResponse()->write('</' . $element->getName() . '>'); } }