IdentifierExpression
in package
implements
ExpressionInterface
Represents a single identifier name in the database.
Identifier values are unsafe with user supplied data. Values will be quoted when identifier quoting is enabled.
Tags
Table of Contents
Interfaces
- ExpressionInterface
- An interface used by Expression objects.
Properties
- $_identifier : string
- Holds the identifier string
- $collation : string|null
Methods
- __construct() : mixed
- Constructor
- getCollation() : string|null
- Returns the collation.
- getIdentifier() : string
- Returns the identifier this expression represents
- setCollation() : void
- Sets the collation.
- setIdentifier() : void
- Sets the identifier this expression represents
- sql() : string
- Converts the Node into a SQL string fragment.
- traverse() : $this
- Iterates over each part of the expression recursively for every level of the expressions tree and executes the $callback callable passing as first parameter the instance of the expression currently being iterated.
Properties
$_identifier
Holds the identifier string
protected
string
$_identifier
$collation
protected
string|null
$collation
Methods
__construct()
Constructor
public
__construct(string $identifier[, string|null $collation = null ]) : mixed
Parameters
- $identifier : string
-
The identifier this expression represents
- $collation : string|null = null
-
The identifier collation
getCollation()
Returns the collation.
public
getCollation() : string|null
Return values
string|nullgetIdentifier()
Returns the identifier this expression represents
public
getIdentifier() : string
Return values
stringsetCollation()
Sets the collation.
public
setCollation(string $collation) : void
Parameters
- $collation : string
-
Identifier collation
setIdentifier()
Sets the identifier this expression represents
public
setIdentifier(string $identifier) : void
Parameters
- $identifier : string
-
The identifier
sql()
Converts the Node into a SQL string fragment.
public
sql(ValueBinder $binder) : string
Parameters
- $binder : ValueBinder
-
Parameter binder
Tags
Return values
stringtraverse()
Iterates over each part of the expression recursively for every level of the expressions tree and executes the $callback callable passing as first parameter the instance of the expression currently being iterated.
public
traverse(Closure $callback) : $this
Parameters
- $callback : Closure
-
The callable to apply to all nodes.