ValuePart
Value part.
For all models that have a value (or expression)
Tags
Table of Contents
- $expression : string
- $hasExpression : bool
- $hasValue : bool
- $value : mixed
- getExpression() : string
- Returns the expression.
- getValue() : null|bool|float|int|PhpConstant|string
- Returns the value.
- hasValue() : bool
- Checks whether a value or expression is set.
- isExpression() : bool
- Returns whether an expression is set.
- setExpression() : $this
- Sets an expression.
- setValue() : $this
- Sets the value.
- unsetExpression() : $this
- Unsets the expression.
- unsetValue() : $this
- Unsets the value.
- isPrimitive() : bool
- Returns whether the given value is a primitive.
Properties
$expression
private
string
$expression
= ''
$hasExpression
private
bool
$hasExpression
= false
$hasValue
private
bool
$hasValue
= false
$value
private
mixed
$value
Methods
getExpression()
Returns the expression.
public
getExpression() : string
Return values
string —getValue()
Returns the value.
public
getValue() : null|bool|float|int|PhpConstant|string
Return values
null|bool|float|int|PhpConstant|string —hasValue()
Checks whether a value or expression is set.
public
hasValue() : bool
Return values
bool —isExpression()
Returns whether an expression is set.
public
isExpression() : bool
Return values
bool —setExpression()
Sets an expression.
public
setExpression(string $expr) : $this
Parameters
- $expr : string
Return values
$this —setValue()
Sets the value.
public
setValue(mixed $value) : $this
Parameters
- $value : mixed
Tags
Return values
$this —unsetExpression()
Unsets the expression.
public
unsetExpression() : $this
Return values
$this —unsetValue()
Unsets the value.
public
unsetValue() : $this
Return values
$this —isPrimitive()
Returns whether the given value is a primitive.
private
isPrimitive(mixed $value) : bool
Parameters
- $value : mixed