ConstantsTrait
trait ConstantsTrait
Methods
setConstants(array $constants)
Sets a collection of constants
$this
boolean
hasConstant(string $name)
Checks whether a constant exists
getConstant(string $name)
Returns a constant.
$this
removeConstant(string $name)
Removes a constant
getConstants(boolean $asObjects = false)
Returns constants
Details
at line line 18
setConstants(array $constants)
Sets a collection of constants
at line line 42
$this
setConstant(string|PhpConstant $nameOrConstant, string $value = null)
Adds a constant
at line line 63
boolean
hasConstant(string $name)
Checks whether a constant exists
at line line 74
PhpConstant
getConstant(string $name)
Returns a constant.
at line line 88
$this
removeConstant(string $name)
Removes a constant
at line line 103
getConstants(boolean $asObjects = false)
Returns constants