You are here

public function PHP_Token_Stream::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/php-token-stream/src/Token/Stream.php \PHP_Token_Stream::__construct()

Constructor.

Parameters

string $sourceCode:

File

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

Class

PHP_Token_Stream
A stream of PHP tokens.

Code

public function __construct($sourceCode) {
  if (is_file($sourceCode)) {
    $this->filename = $sourceCode;
    $sourceCode = file_get_contents($sourceCode);
  }
  $this
    ->scan($sourceCode);
}