PHP 클래스 SqlParser\Components\OptionsArray

상속: extends SqlParser\Component
파일 보기 프로젝트 열기: phpmyadmin/sql-parser 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$options array ArrayObj of selected options.

공개 메소드들

메소드 설명
__construct ( array $options = [] ) Constructor.
build ( OptionsArray $component, array $options = [] ) : string
has ( string $key, boolean $getExpr = false ) : mixed Checks if it has the specified option and returns it value or true.
isEmpty ( ) : boolean Checks tf there are no options set.
merge ( array | OptionsArray $options ) : void Merges the specified options with these ones. Values with same ID will be replaced.
parse ( Parser $parser, TokensList $list, array $options = [] ) : OptionsArray
remove ( string $key ) : boolean Removes the option from the array.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $options = [] )
$options array The array of options. Options that have a value must be an array with at least two keys `name` and `expr` or `value`.

build() 공개 정적인 메소드

public static build ( OptionsArray $component, array $options = [] ) : string
$component OptionsArray The component to be built.
$options array Parameters for building.
리턴 string

has() 공개 메소드

Checks if it has the specified option and returns it value or true.
public has ( string $key, boolean $getExpr = false ) : mixed
$key string The key to be checked.
$getExpr boolean Gets the expression instead of the value. The value is the processed form of the expression.
리턴 mixed

isEmpty() 공개 메소드

Checks tf there are no options set.
public isEmpty ( ) : boolean
리턴 boolean

merge() 공개 메소드

Merges the specified options with these ones. Values with same ID will be replaced.
public merge ( array | OptionsArray $options ) : void
$options array | OptionsArray The options to be merged.
리턴 void

parse() 공개 정적인 메소드

public static parse ( Parser $parser, TokensList $list, array $options = [] ) : OptionsArray
$parser SqlParser\Parser The parser that serves as context.
$list SqlParser\TokensList The list of tokens that are being parsed.
$options array Parameters for parsing.
리턴 OptionsArray

remove() 공개 메소드

Removes the option from the array.
public remove ( string $key ) : boolean
$key string The key to be removed.
리턴 boolean Whether the key was found and deleted or not.

프로퍼티 상세

$options 공개적으로 프로퍼티

ArrayObj of selected options.
public array $options
리턴 array