You are here

class OutputElement in Extensible BBCode 8.3

Same name and namespace in other branches
  1. 4.0.x src/Parser/Tree/OutputElement.php \Drupal\xbbcode\Parser\Tree\OutputElement

Represent a rendered element in the parse tree.

Hierarchy

Expanded class hierarchy of OutputElement

1 file declares its use of OutputElement
TagProcessorBase.php in src/Parser/Processor/TagProcessorBase.php

File

src/Parser/Tree/OutputElement.php, line 8

Namespace

Drupal\xbbcode\Parser\Tree
View source
class OutputElement implements OutputElementInterface {

  /**
   * The output.
   *
   * @var string
   */
  private $text;

  /**
   * OutputElement constructor.
   *
   * @param string $text
   *   The output.
   */
  public function __construct($text) {
    $this->text = $text;
  }

  /**
   * {@inheritdoc}
   */
  public function __toString() : string {
    return $this->text;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
OutputElement::$text private property The output.
OutputElement::__construct public function OutputElement constructor.
OutputElement::__toString public function Convert to string. Overrides OutputElementInterface::__toString