abstract class Component (View source)

A component (of a statement) is a part of a statement that is common to multiple query types.

Methods

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

Parses the tokens contained in the given list in the context of the given parser.

static mixed
build(mixed $component, array $options = [])

Builds the string representation of a component of this type.

string
__toString()

Builds the string representation of a component of this type.

Details

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

Parses the tokens contained in the given list in the context of the given parser.

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

Exceptions

Exception not implemented yet.

static mixed build(mixed $component, array $options = [])

Builds the string representation of a component of this type.

In other words, this function represents the inverse function of static::parse.

Parameters

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

Return Value

mixed

Exceptions

Exception not implemented yet.

string __toString()

Builds the string representation of a component of this type.

Return Value

string

See also

static::build