abstract class PHP_Token

A PHP token.

@author Sebastian Bergmann <sb@sebastian-bergmann.de> @copyright 2009-2012 Sebastian Bergmann <sb@sebastian-bergmann.de> @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License @version Release: @package_version@ @link http://github.com/sebastianbergmann/php-token-stream/tree @since Class available since Release 1.0.0

Hierarchy

Expanded class hierarchy of PHP_Token

2 string references to 'PHP_Token'
PHPUnit_Util_GlobalState::phpunitFiles in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/GlobalState.php
@since Method available since Release 3.6.0
PHP_CodeCoverage_Filter::prefillBlacklist in drupal/core/vendor/phpunit/php-code-coverage/PHP/CodeCoverage/Filter.php
@since Method available since Release 1.2.3

File

drupal/core/vendor/phpunit/php-token-stream/PHP/Token.php, line 54

View source
abstract class PHP_Token {

  /**
   * @var string
   */
  protected $text;

  /**
   * @var integer
   */
  protected $line;

  /**
   * @var PHP_Token_Stream
   */
  protected $tokenStream;

  /**
   * @var integer
   */
  protected $id;

  /**
   * Constructor.
   *
   * @param string           $text
   * @param integer          $line
   * @param PHP_Token_Stream $tokenStream
   * @param integer          $id
   */
  public function __construct($text, $line, PHP_Token_Stream $tokenStream, $id) {
    $this->text = $text;
    $this->line = $line;
    $this->tokenStream = $tokenStream;
    $this->id = $id;
  }

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

  /**
   * @return integer
   */
  public function getLine() {
    return $this->line;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PHP_Token::$id protected property
PHP_Token::$line protected property
PHP_Token::$text protected property
PHP_Token::$tokenStream protected property
PHP_Token::getLine public function
PHP_Token::__construct public function Constructor.
PHP_Token::__toString public function