You are here

abstract class PHP_Token in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpunit/php-token-stream/src/Token.php \PHP_Token

A PHP token.

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

Hierarchy

Expanded class hierarchy of PHP_Token

1 string reference to 'PHP_Token'
PHPUnit_Framework_TestCase::createGlobalStateSnapshot in vendor/phpunit/phpunit/src/Framework/TestCase.php

File

vendor/phpunit/php-token-stream/src/Token.php, line 20

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