Method |
Description |
|
__construct ( string $type, string $name, zephir\Branch $branch, mixed $defaultInitValue = null ) |
Variable constructor |
|
enableDefaultAutoInitValue ( ) |
Sets an automatic safe default init value according to its type |
|
getAssociatedClass ( ) : ClassDefinition |
Returns the class related to the variable |
|
getBranch ( ) : zephir\Branch |
Get the branch where the variable was declared |
|
getClassTypes ( ) : array |
Returns the PHP classes associated to the variable |
|
getDefaultInitValue ( ) : mixed |
Returns the default init value |
|
getDynamicTypes ( ) : array |
Returns the current dynamic type in a polymorphic variable |
|
getInitBranch ( ) : boolean | integer |
Get init branch |
|
getInitBranches ( ) : array |
Get init marked branch |
|
getLastUsedNode ( ) : array |
Returns the last node where the variable was assigned or used |
|
getName ( ) : string |
Returns variable's name |
|
getNumberMutations ( ) : integer |
Returns the number of mutations performed over the variable |
|
getNumberUses ( ) : integer |
Return the number of uses |
|
getOriginal ( ) : array |
Returns the original AST node where the variable was declared |
|
getPossibleValue ( ) : mixed |
Returns the latest CompiledExpression assigned to a variable |
|
getPossibleValueBranch ( ) : zephir\Branch |
Returns the branch where the variable was assigned for the last time |
|
getRealName ( ) : string |
Returns variable's real name |
|
getSkipVariant ( ) : integer |
Get the number of initializations remaining to skip |
|
getType ( ) : string |
Returns the type of variable |
|
hasAnyDynamicType ( mixed $types ) : boolean |
Checks if the variable has any of the passed dynamic |
|
hasDifferentDynamicType ( array | string $types ) : boolean |
Check if the variable has at least one dynamic type to the ones passed in the list |
|
increaseMutates ( ) |
Increase the number of mutations a variable may have |
|
increaseUses ( ) |
Increase the number of uses a variable may have |
|
increaseVariantIfNull ( ) |
Increase the number of times the variable has been initialized |
|
initComplexLiteralVariant ( zephir\CompilationContext $compilationContext ) |
Initializes a variant variable that is intended to have the special
behavior of only freed its body value instead of the full variable |
|
initNonReferenced ( zephir\CompilationContext $compilationContext ) |
*
Allocate memory for variable and init it null val |
|
initVariant ( zephir\CompilationContext $compilationContext ) |
Initializes a variant variable |
|
isArray ( ) : boolean |
Shortcut is type double? |
|
isBoolean ( ) : boolean |
Shortcut is type bool? |
|
isDouble ( ) : boolean |
Shortcut is type double? |
|
isDoublePointer ( ) |
Returns the variable |
|
isExternal ( ) : boolean |
Check if the variable is a parameter |
|
isIdle ( ) : boolean |
Checks if the variable is idle |
|
isInitialized ( ) : boolean |
Check if the variable is initialized or not |
|
isInt ( ) : boolean |
Shortcut is type int? |
|
isLocalOnly ( ) : boolean |
Checks if the variable is local-only scoped |
|
isMemoryTracked ( ) : boolean |
Checks if the variable is tracked by the memory manager |
|
isNotVariable ( ) : boolean |
Shortcut is type variable or string? |
|
isNotVariableAndArray ( ) : boolean |
Shortcut is type variable or array? |
|
isNotVariableAndString ( ) : boolean |
Shortcut is type variable or string? |
|
isReadOnly ( ) : boolean |
Returns if the variable is read only |
|
isReusable ( ) : boolean |
Checks if the temporary variable is reusable |
|
isString ( ) : boolean |
Shortcut is type string? |
|
isTemporal ( ) : boolean |
Returns whether the variable is temporal or not |
|
isUsed ( ) : boolean |
Checks whether the last value assigned was used |
|
isVariable ( ) : boolean |
Shortcut is type variable? |
|
mustInitNull ( ) : boolean |
Set if the variable must be initialized to null |
|
observeOrNullifyVariant ( zephir\CompilationContext $compilationContext ) |
Observes a variable in the memory frame without initialization or nullify
an existing allocated variable |
|
observeVariant ( zephir\CompilationContext $compilationContext ) |
Observes a variable in the memory frame without initialization |
|
separate ( zephir\CompilationContext $compilationContext ) |
Separates variables before being updated |
|
setAssociatedClass ( ClassDefinition $associatedClass ) |
Sets the PHP class related to variable |
|
setClassTypes ( string | array $classTypes ) |
Sets the PHP class related to variable |
|
setDefaultInitValue ( mixed $value ) |
Sets the default init value |
|
setDynamicTypes ( string | array $types ) |
Sets the current dynamic type in a polymorphic variable |
|
setIdle ( boolean $idle ) |
Once a temporal variable is unused in a specific branch it is marked as idle |
|
setIsDoublePointer ( boolean $doublePointer ) |
Marks the variable to be defined as a double pointer |
|
setIsExternal ( boolean $isExternal ) |
Set if the symbol is a parameter of the method or not |
|
setIsInitialized ( boolean $initialized, zephir\CompilationContext $compilationContext ) |
Sets if the variable is initialized
This allow to throw an exception if the variable is being read without prior initialization |
|
setLocalOnly ( boolean $localOnly ) |
Sets if the variable is local-only scoped |
|
setLowName ( string $lowName ) |
Sets the compiled variable's name |
|
setMemoryTracked ( boolean $memoryTracked ) |
Sets if the variable is not tracked by the memory manager |
|
setMustInitNull ( boolean $mustInitNull ) : boolean |
Set if the variable must be initialized to null |
|
setOriginal ( array $node ) |
Set the original AST node where the variable was declared |
|
setPossibleValue ( zephir\CompiledExpression $possibleValue, zephir\CompilationContext $compilationContext ) |
Sets the latest CompiledExpression assigned to a variable |
|
setReadOnly ( boolean $readOnly ) |
Sets if the variable is read only |
|
setReusable ( boolean $reusable ) |
Some temporary variables can't be reused |
|
setTemporal ( boolean $temporal ) |
Sets whether the variable is temporal or not |
|
setUsed ( boolean $used, array $node ) |
Sets the latest node where a variable was used |
|
skipInitVariant ( integer $numberSkips ) |
Skips variable initialization |
|
trackVariant ( zephir\CompilationContext $compilationContext ) |
Tells the compiler a generated code will track the variable |
|