PHP Class SqlParser\Components\Reference

Inheritance: extends SqlParser\Component
Show file Open project: phpmyadmin/sql-parser Class Usage Examples

Public Properties

Property Type Description
$REFERENCES_OPTIONS array All references options.
$columns array The referenced columns.
$options OptionsArray The options of the referencing.
$table Expression The referenced table.

Public Methods

Method Description
__construct ( Expression $table = null, array $columns = [], OptionsArray $options = null ) Constructor.
build ( Reference $component, array $options = [] ) : string
parse ( Parser $parser, TokensList $list, array $options = [] ) : Reference

Method Details

__construct() public method

Constructor.
public __construct ( Expression $table = null, array $columns = [], OptionsArray $options = null )
$table Expression The name of the table referenced.
$columns array The columns referenced.
$options OptionsArray The options.

build() public static method

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

parse() public static method

public static parse ( Parser $parser, TokensList $list, array $options = [] ) : Reference
$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.
return Reference

Property Details

$REFERENCES_OPTIONS public static property

All references options.
public static array $REFERENCES_OPTIONS
return array

$columns public property

The referenced columns.
public array $columns
return array

$options public property

The options of the referencing.
public OptionsArray,SqlParser\Components $options
return OptionsArray

$table public property

The referenced table.
public Expression,SqlParser\Components $table
return Expression