PHP Class SqlParser\Utils\BufferedQuery

Implements a specialized lexer used to extract statements from large inputs that are being buffered. After each statement has been extracted, a lexer or a parser may be used. All comments are skipped, with one exception: MySQL commands inside /*!.
Afficher le fichier Open project: phpmyadmin/sql-parser Class Usage Examples

Méthodes publiques

Свойство Type Description
$current string The last incomplete query that was extracted.
$delimiter string The last delimiter used.
$delimiterLen integer The length of the delimiter.
$options array The options of this parser.
$query string This field can be modified just by appending to it!
$status integer The current status of the parser.

Méthodes publiques

Méthode Description
__construct ( string $query = '', array $options = [] ) Constructor.
extract ( boolean $end = false ) : string Extracts a statement from the buffer.
setDelimiter ( string $delimiter ) Sets the delimiter.

Method Details

__construct() public méthode

Constructor.
public __construct ( string $query = '', array $options = [] )
$query string The query to be parsed.
$options array The options of this parser.

extract() public méthode

Extracts a statement from the buffer.
public extract ( boolean $end = false ) : string
$end boolean Whether the end of the buffer was reached.
Résultat string

setDelimiter() public méthode

Used to update the length of it too.
public setDelimiter ( string $delimiter )
$delimiter string

Property Details

$current public_oe property

The last incomplete query that was extracted.
public string $current
Résultat string

$delimiter public_oe property

The last delimiter used.
public string $delimiter
Résultat string

$delimiterLen public_oe property

The length of the delimiter.
public int $delimiterLen
Résultat integer

$options public_oe property

The options of this parser.
public array $options
Résultat array

$query public_oe property

This field can be modified just by appending to it!
public string $query
Résultat string

$status public_oe property

The current status of the parser.
public int $status
Résultat integer