class Expression extends Component

Parses a reference to an expression (column, table or database name, function call, mathematical expression, etc.).

Properties

string $database The name of this database.
string $table The name of this table.
string $column The name of the column.
string $expr The sub-expression.
string $alias The alias of this expression.
mixed $function The name of the function.
string $subquery The type of subquery.

Methods

static mixed
parse(Parser $parser, TokensList $list, array $options = array())

Possible options:.

static string
build(mixed $component, array $options = array())

No description

string
__toString()

Builds the string representation of a component of this type.

from Component
__construct(string $database = null, string $table = null, string $column = null, string $alias = null)

Constructor.

Details

at line 149
static mixed parse(Parser $parser, TokensList $list, array $options = array())

Possible options:.

field

     First field to be filled.
     If this is not specified, it takes the value of `parseField`.

 `parseField`

     Specifies the type of the field parsed. It may be `database`,
     `table` or `column`. These expressions may not include
     parentheses.

 `breakOnAlias`

     If not empty, breaks when the alias occurs (it is not included).

 `breakOnParentheses`

     If not empty, breaks when the first parentheses occurs.

 `parenthesesDelimited`

     If not empty, breaks after last parentheses occurred.

Parameters

Parser $parser the parser that serves as context
TokensList $list the list of tokens that are being parsed
array $options parameters for parsing

Return Value

mixed

at line 421
static string build(mixed $component, array $options = array())

Parameters

mixed $component the component to be built
array $options parameters for building

Return Value

string

in Component at line 73
string __toString()

Builds the string representation of a component of this type.

Return Value

string

See also

at line 104
__construct(string $database = null, string $table = null, string $column = null, string $alias = null)

Constructor.

Syntax: new Expression('expr') new Expression('expr', 'alias') new Expression('database', 'table', 'column') new Expression('database', 'table', 'column', 'alias')

If the database, table or column name is not required, pass an empty string.

Parameters

string $database The name of the database or the the expression. the the expression.
string $table The name of the table or the alias of the expression. the alias of the expression.
string $column the name of the column
string $alias the name of the alias