PHP Class PhpCss\Scanner\Status

It defines the API and provides basic logic to match patterns.
Mostrar archivo Open project: ThomasWeinert/PhpCss

Public Methods

Method Description
getNewStatus ( Token $token ) : Status Get new (sub)status if needed.
getToken ( string $buffer, integer $offset ) : Token Try to get token in buffer at offset position.
isEndToken ( Token $token ) : boolean Check if token ends status
matchPattern ( string $buffer, integer $offset, string $pattern ) : string | null Checks if the given offset position matches the pattern.

Method Details

getNewStatus() abstract public method

Get new (sub)status if needed.
abstract public getNewStatus ( Token $token ) : Status
$token Token
return Status

getToken() abstract public method

Try to get token in buffer at offset position.
abstract public getToken ( string $buffer, integer $offset ) : Token
$buffer string
$offset integer
return Token

isEndToken() abstract public method

Check if token ends status
abstract public isEndToken ( Token $token ) : boolean
$token Token
return boolean

matchPattern() public method

Checks if the given offset position matches the pattern.
public matchPattern ( string $buffer, integer $offset, string $pattern ) : string | null
$buffer string
$offset integer
$pattern string
return string | null