final class OptionsArray implements Component (View source)

Methods

__construct(array $options = [])

No description

string
build()

Builds the string representation of a component of this type.

bool
has(string $key)

No description

Expression
get(string $key, bool $getExpr = false)

Checks if it has the specified option and returns its value.

bool
remove(string $key)

Removes the option from the array.

void
merge(OptionsArray $options)

Merges the specified options with these ones. Values with same ID will be replaced.

bool
isEmpty()

Checks tf there are no options set.

string
__toString()

No description

Details

__construct(array $options = [])

No description

Parameters

array $options

$options The array of options. Options that have a value must be an array with at least two keys name and expr or value.

string build()

Builds the string representation of a component of this type.

In other words, this function represents the inverse function of {\PhpMyAdmin\SqlParser\Component::parse()}.

Return Value

string

bool has(string $key)

No description

Parameters

string $key

Return Value

bool

Expression get(string $key, bool $getExpr = false)

Checks if it has the specified option and returns its value.

Parameters

string $key

the key to be checked

bool $getExpr

Gets the expression instead of the value. The value is the processed form of the expression.

Return Value

Expression

bool remove(string $key)

Removes the option from the array.

Parameters

string $key

the key to be removed

Return Value

bool

whether the key was found and deleted or not

void merge(OptionsArray $options)

Merges the specified options with these ones. Values with same ID will be replaced.

Parameters

OptionsArray $options

Return Value

void

bool isEmpty()

Checks tf there are no options set.

Return Value

bool

string __toString()

No description

Return Value

string