Expression
in package
Predicate expression parser class
Tags
Table of Contents
Properties
- $operators : array<string|int, mixed>
- Allowed operators
Methods
- convertExpressionsToShorthand() : array<string|int, mixed>
- Convert to expression to shorthand value
- convertExpressionToShorthand() : array<string|int, mixed>
- Convert to expression to shorthand value
- parse() : array<string|int, mixed>
- Method to parse a predicate string expression into its components
- parseExpressions() : array<string|int, mixed>
- Method to parse predicate string expressions into its components
- parseShorthand() : array<string|int, mixed>
- Method to parse the shorthand columns to create expressions and their parameters
- quote() : string
- Quote the value (if it is not a numeric value)
- stripIdQuotes() : string
- Strip ID quotes
- stripQuotes() : string
- Strip quotes
Properties
$operators
Allowed operators
protected
static array<string|int, mixed>
$operators
= ['>=', '<=', '!=', '=', '>', '<', 'NOT LIKE', 'LIKE', 'NOT BETWEEN', 'BETWEEN', 'NOT IN', 'IN', 'IS NOT NULL', 'IS NULL']
Methods
convertExpressionsToShorthand()
Convert to expression to shorthand value
public
static convertExpressionsToShorthand(array<string|int, mixed> $expressions) : array<string|int, mixed>
Parameters
- $expressions : array<string|int, mixed>
Return values
array<string|int, mixed>convertExpressionToShorthand()
Convert to expression to shorthand value
public
static convertExpressionToShorthand(string $expression) : array<string|int, mixed>
Parameters
- $expression : string
Return values
array<string|int, mixed>parse()
Method to parse a predicate string expression into its components
public
static parse(string $expression) : array<string|int, mixed>
Parameters
- $expression : string
Tags
Return values
array<string|int, mixed>parseExpressions()
Method to parse predicate string expressions into its components
public
static parseExpressions(array<string|int, mixed> $expressions) : array<string|int, mixed>
Parameters
- $expressions : array<string|int, mixed>
Return values
array<string|int, mixed>parseShorthand()
Method to parse the shorthand columns to create expressions and their parameters
public
static parseShorthand(array<string|int, mixed> $columns[, string|null $placeholder = null ][, bool $flatten = true ]) : array<string|int, mixed>
Parameters
- $columns : array<string|int, mixed>
- $placeholder : string|null = null
- $flatten : bool = true
Return values
array<string|int, mixed>quote()
Quote the value (if it is not a numeric value)
public
static quote(string $value) : string
Parameters
- $value : string
Return values
stringstripIdQuotes()
Strip ID quotes
public
static stripIdQuotes(string $identifier) : string
Parameters
- $identifier : string
Return values
stringstripQuotes()
Strip quotes
public
static stripQuotes(string $value) : string
Parameters
- $value : string