final class OptionsArray implements Component (View source)

Parses a list of options.

Methods

__construct(array $options = [])

No description

string
build()

Builds the string representation of a component of this type.

mixed
has(string $key, bool $getExpr = false)

Checks if it has the specified option and returns it value or true.

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

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

mixed has(string $key, bool $getExpr = false)

Checks if it has the specified option and returns it value or true.

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

mixed

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