You are here

OutputElement.php in Extensible BBCode 8.3

Same filename and directory in other branches
  1. 4.0.x src/Parser/Tree/OutputElement.php

File

src/Parser/Tree/OutputElement.php
View source
<?php

namespace Drupal\xbbcode\Parser\Tree;


/**
 * Represent a rendered element in the parse tree.
 */
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;
  }

}

Classes

Namesort descending Description
OutputElement Represent a rendered element in the parse tree.