function Tokenizer::__construct
Same name in this branch
- 11.1.x vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php \Masterminds\HTML5\Parser\Tokenizer::__construct()
- 11.1.x vendor/symfony/css-selector/Parser/Tokenizer/Tokenizer.php \Symfony\Component\CssSelector\Parser\Tokenizer\Tokenizer::__construct()
Initialise and run the tokenizer.
Parameters
string $content The content to tokenize.:
\PHP_CodeSniffer\Config | null $config The config data for the run.:
string $eolChar The EOL char used in the content.:
Return value
void
Throws
\PHP_CodeSniffer\Exceptions\TokenizerException If the file appears to be minified.
4 calls to Tokenizer::__construct()
- CSS::__construct in vendor/
squizlabs/ php_codesniffer/ src/ Tokenizers/ CSS.php - Initialise the tokenizer.
- CSS::__construct in vendor/
squizlabs/ php_codesniffer/ src/ Tokenizers/ CSS.php - Initialise the tokenizer.
- JS::__construct in vendor/
squizlabs/ php_codesniffer/ src/ Tokenizers/ JS.php - Initialise the tokenizer.
- JS::__construct in vendor/
squizlabs/ php_codesniffer/ src/ Tokenizers/ JS.php - Initialise the tokenizer.
2 methods override Tokenizer::__construct()
- CSS::__construct in vendor/
squizlabs/ php_codesniffer/ src/ Tokenizers/ CSS.php - Initialise the tokenizer.
- JS::__construct in vendor/
squizlabs/ php_codesniffer/ src/ Tokenizers/ JS.php - Initialise the tokenizer.
File
-
vendor/
squizlabs/ php_codesniffer/ src/ Tokenizers/ Tokenizer.php, line 86
Class
Namespace
PHP_CodeSniffer\TokenizersCode
public function __construct($content, $config, $eolChar = '\\n') {
$this->eolChar = $eolChar;
$this->config = $config;
$this->tokens = $this->tokenize($content);
if ($config === null) {
return;
}
$this->createPositionMap();
$this->createTokenMap();
$this->createParenthesisNestingMap();
$this->createScopeMap();
$this->createLevelMap();
// Allow the tokenizer to do additional processing if required.
$this->processAdditional();
}