You are here

OutputElement.php in Extensible BBCode 4.0.x

Same filename and directory in other branches
  1. 8.3 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(string $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.