You are here

public function AbstractLexer::setInput in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php \Doctrine\Common\Lexer\AbstractLexer::setInput()

Sets the input data to be tokenized.

The Lexer is immediately reset and the new input tokenized. Any unprocessed tokens from any previous input are lost.

Parameters

string $input The input to be tokenized.:

Return value

void

File

vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php, line 90

Class

AbstractLexer
Base class for writing simple lexers, i.e. for creating small DSLs.

Namespace

Doctrine\Common\Lexer

Code

public function setInput($input) {
  $this->input = $input;
  $this->tokens = array();
  $this
    ->reset();
  $this
    ->scan($input);
}