You are here

ParserInterface.php in Extensible BBCode 4.0.x

Same filename and directory in other branches
  1. 8.3 src/Parser/ParserInterface.php

File

src/Parser/ParserInterface.php
View source
<?php

namespace Drupal\xbbcode\Parser;

use Drupal\xbbcode\Parser\Tree\NodeElementInterface;

/**
 * An interface for parsers.
 */
interface ParserInterface {

  /**
   * Parse a text and build an element tree.
   *
   * @param string $text
   *   The source text.
   *
   * @return \Drupal\xbbcode\Parser\Tree\NodeElementInterface
   *   The element representing the root of the tree.
   */
  public function parse(string $text) : NodeElementInterface;

}

Interfaces

Namesort descending Description
ParserInterface An interface for parsers.