PHP Class SqlParser\Components\Condition

Author: Dan Ungureanu ([email protected])
Inheritance: extends SqlParser\Component
Datei anzeigen Open project: phpmyadmin/sql-parser Class Usage Examples

Public Properties

Property Type Description
$ALLOWED_KEYWORDS array List of allowed reserved keywords in conditions.
$DELIMITERS array Logical operators that can be used to delimit expressions.
$expr string The condition.
$identifiers array Identifiers recognized.
$isOperator boolean Whether this component is an operator.

Public Methods

Method Description
__construct ( string $expr = null ) Constructor.
build ( Condition[] $component, array $options = [] ) : string
parse ( Parser $parser, TokensList $list, array $options = [] ) : Condition[]

Method Details

__construct() public method

Constructor.
public __construct ( string $expr = null )
$expr string The condition or the operator.

build() public static method

public static build ( Condition[] $component, array $options = [] ) : string
$component Condition[] The component to be built.
$options array Parameters for building.
return string

parse() public static method

public static parse ( Parser $parser, TokensList $list, array $options = [] ) : Condition[]
$parser SqlParser\Parser The parser that serves as context.
$list SqlParser\TokensList The list of tokens that are being parsed.
$options array Parameters for parsing.
return Condition[]

Property Details

$ALLOWED_KEYWORDS public_oe static_oe property

List of allowed reserved keywords in conditions.
public static array $ALLOWED_KEYWORDS
return array

$DELIMITERS public_oe static_oe property

Logical operators that can be used to delimit expressions.
public static array $DELIMITERS
return array

$expr public_oe property

The condition.
public string $expr
return string

$identifiers public_oe property

Identifiers recognized.
public array $identifiers
return array

$isOperator public_oe property

Whether this component is an operator.
public bool $isOperator
return boolean