ConstantsInterface
interface ConstantsInterface
Interface to all php structs that can have constants
Implementation is realized in the ConstantsPart
Methods
$this
setConstants(array $constants)
Sets a collection of constants
$this
$this
bool
getConstants()
Returns constants
string[]
getConstantNames()
Returns all constant names
$this
clearConstants()
Clears all constants
Details
at line line 19
$this
setConstants(array $constants)
Sets a collection of constants
at line line 28
$this
setConstant(string|PhpConstant $nameOrConstant, string $value = null)
Adds a constant
at line line 37
$this
removeConstant(string|PhpConstant $nameOrConstant)
Removes a constant
at line line 45
bool
hasConstant(string|PhpConstant $nameOrConstant)
Checks whether a constant exists
at line line 54
PhpConstant
getConstant(string|PhpConstant $nameOrConstant)
Returns a constant
at line line 61
PhpConstant[]
getConstants()
Returns constants
at line line 68
string[]
getConstantNames()
Returns all constant names
at line line 75
$this
clearConstants()
Clears all constants