PHP Class Zephir\BaseBackend

显示文件 Open project: phalcon/zephir Class Usage Examples

Protected Properties

Property Type Description
$config Zephir\Config
$name string The name of the backend (e.g. ZendEngine2)

Public Methods

Method Description
__construct ( Zephir\Config $config ) BaseBackend constructor
addArrayEntry ( Variable $variable, $key, $value, zephir\CompilationContext $context, $statement = null, $useCodePrinter = true )
arrayFetch ( Variable $var, Variable $src, $index, $flags, $arrayAccess, zephir\CompilationContext $context, $useCodePrinter = true ) * Read from array
arrayIsset ( Variable $var, $resolvedExpr, $expression, zephir\CompilationContext $context )
arrayIssetFetch ( Variable $target, Variable $var, $resolvedExpr, $flags, $expression, zephir\CompilationContext $context )
arrayUnset ( Variable $variable, $exprIndex, $flags, zephir\CompilationContext $context ) * Unset array
assignArrayMulti ( Variable $variable, $symbolVariable, $offsetExprs, zephir\CompilationContext $context ) * Array update multi
assignArrayProperty ( Variable $variable, $property, $key, $value, zephir\CompilationContext $context )
assignBool ( Variable $variable, $value, zephir\CompilationContext $context, $useCodePrinter = true )
assignDouble ( Variable $variable, $value, zephir\CompilationContext $context, $useCodePrinter = true )
assignLong ( Variable $variable, $value, zephir\CompilationContext $context, $useCodePrinter = true )
assignNull ( Variable $variable, zephir\CompilationContext $context, $useCodePrinter = true )
assignPropertyArrayMulti ( Variable $variable, $valueVariable, $propertyName, $offsetExprs, zephir\CompilationContext $context )
assignStaticPropertyArrayMulti ( $classEntry, $valueVariable, $propertyName, $offsetExprs, zephir\CompilationContext $compilationContext )
assignString ( Variable $variable, $value, zephir\CompilationContext $context, $useCodePrinter = true, $doCopy = true ) * Assign values to variables
assignZval ( Variable $variable, $code, zephir\CompilationContext $context )
callDynamicFunction ( $symbolVariable, Variable $variable, zephir\CompilationContext $compilationContext, $params = [], $cache = 'NULL', $cacheSlot ) * Method calling
callMethod ( $symbolVariable, Variable $variable, $methodName, $cachePointer, $params, zephir\CompilationContext $context )
checkConstructor ( Variable $var, zephir\CompilationContext $context )
checkStrictType ( $type, $var, zephir\CompilationContext $context )
concatSelf ( Variable $variable, Variable $itemVariable, zephir\CompilationContext $context )
copyOnWrite ( Variable $target, $var, zephir\CompilationContext $context )
createClosure ( Variable $variable, $classDefinition, zephir\CompilationContext $context )
declareConstant ( $type, $name, $value, zephir\CompilationContext $context )
destroyIterator ( Variable $iteratorVariable, zephir\CompilationContext $context )
fetchClass ( Variable $var, $name, $guarded, zephir\CompilationContext $context )
fetchClassEntry ( $str )
fetchGlobal ( Variable $globalVar, zephir\CompilationContext $compilationContext, $useCodePrinter = true )
fetchProperty ( Variable $symbolVariable, Variable $variableVariable, $property, $readOnly, zephir\CompilationContext $context, $useOptimized = false )
fetchStaticProperty ( Variable $symbolVariable, $classDefinition, $property, $readOnly, zephir\CompilationContext $context )
forStatement ( Variable $exprVariable, $keyVariable, $variable, $duplicateKey, $duplicateHash, $statement, $statementBlock, zephir\CompilationContext $context ) * For statement
forStatementIterator ( Variable $iteratorVariable, Variable $targetVariable, zephir\CompilationContext $compilationContext )
generateInitCode ( &$groupVariables, $type, $pointer, Variable $variable )
getActiveBackend ( )
getBoolCode ( Variable $variable, zephir\CompilationContext $context, $useCodePrinter = true )
getInternalKernelPath ( ) : string Resolves the path to the source kernel files of the backend
getInternalSignature ( ClassMethod $method, zephir\CompilationContext $context )
getInternalTemplatePath ( ) : string Resolves the path to the source template files of the backend
getName ( )
getScalarTempVariable ( $type, zephir\CompilationContext $compilationContext, $isLocal = true )
getStringsManager ( )
getTemplateFileContents ( $filename ) : string Resolves the path to the source template file of the backend
getTypeDefinition ( $type )
getTypeofCondition ( Variable $variableVariable, $operator, $value, zephir\CompilationContext $context )
getVariableCode ( Variable $variable ) : string
getVariableCodePointer ( Variable $variable ) : string Get a double pointer to the variable
ifVariableValueUndefined ( Variable $var, zephir\CompilationContext $context, $onlyBody = false, $useCodePrinter = true )
initArray ( Variable $variable, zephir\CompilationContext $context, $size = null, $useCodePrinter = true )
initObject ( Variable $variable, $ce, zephir\CompilationContext $context, $useCodePrinter = true )
initVar ( Variable $variable, zephir\CompilationContext $context, $useCodePrinter = true, $second = false )
maybeSeparate ( Variable $variableTempSeparated, Variable $variable, zephir\CompilationContext $context )
onPostCompile ( $method, zephir\CompilationContext $context )
onPreCompile ( $method, zephir\CompilationContext $context )
onPreInitVar ( $method, zephir\CompilationContext $context )
propertyIsset ( Variable $var, $key, zephir\CompilationContext $context )
returnString ( $value, zephir\CompilationContext $context, $useCodePrinter = true )
setSymbolIfSeparated ( Variable $variableTempSeparated, Variable $variable, zephir\CompilationContext $context )
updateArray ( Variable $symbolVariable, $key, $value, zephir\CompilationContext $compilationContext, $flags = null )
updateProperty ( Variable $symbolVariable, $propertyName, $value, zephir\CompilationContext $compilationContext )
updateStaticProperty ( $classEntry, $property, $value, zephir\CompilationContext $context )
zvalOperator ( $zvalOperator, Variable $expected, Variable $variableLeft, Variable $variableRight, zephir\CompilationContext $compilationContext )

Method Details

__construct() public method

BaseBackend constructor
public __construct ( Zephir\Config $config )
$config Zephir\Config

addArrayEntry() abstract public method

abstract public addArrayEntry ( Variable $variable, $key, $value, zephir\CompilationContext $context, $statement = null, $useCodePrinter = true )
$variable Variable
$context zephir\CompilationContext

arrayFetch() abstract public method

* Read from array
abstract public arrayFetch ( Variable $var, Variable $src, $index, $flags, $arrayAccess, zephir\CompilationContext $context, $useCodePrinter = true )
$var Variable
$src Variable
$context zephir\CompilationContext

arrayIsset() abstract public method

abstract public arrayIsset ( Variable $var, $resolvedExpr, $expression, zephir\CompilationContext $context )
$var Variable
$context zephir\CompilationContext

arrayIssetFetch() abstract public method

abstract public arrayIssetFetch ( Variable $target, Variable $var, $resolvedExpr, $flags, $expression, zephir\CompilationContext $context )
$target Variable
$var Variable
$context zephir\CompilationContext

arrayUnset() abstract public method

* Unset array
abstract public arrayUnset ( Variable $variable, $exprIndex, $flags, zephir\CompilationContext $context )
$variable Variable
$context zephir\CompilationContext

assignArrayMulti() abstract public method

* Array update multi
abstract public assignArrayMulti ( Variable $variable, $symbolVariable, $offsetExprs, zephir\CompilationContext $context )
$variable Variable
$context zephir\CompilationContext

assignArrayProperty() abstract public method

abstract public assignArrayProperty ( Variable $variable, $property, $key, $value, zephir\CompilationContext $context )
$variable Variable
$context zephir\CompilationContext

assignBool() abstract public method

abstract public assignBool ( Variable $variable, $value, zephir\CompilationContext $context, $useCodePrinter = true )
$variable Variable
$context zephir\CompilationContext

assignDouble() abstract public method

abstract public assignDouble ( Variable $variable, $value, zephir\CompilationContext $context, $useCodePrinter = true )
$variable Variable
$context zephir\CompilationContext

assignLong() abstract public method

abstract public assignLong ( Variable $variable, $value, zephir\CompilationContext $context, $useCodePrinter = true )
$variable Variable
$context zephir\CompilationContext

assignNull() abstract public method

abstract public assignNull ( Variable $variable, zephir\CompilationContext $context, $useCodePrinter = true )
$variable Variable
$context zephir\CompilationContext

assignPropertyArrayMulti() abstract public method

abstract public assignPropertyArrayMulti ( Variable $variable, $valueVariable, $propertyName, $offsetExprs, zephir\CompilationContext $context )
$variable Variable
$context zephir\CompilationContext

assignStaticPropertyArrayMulti() abstract public method

abstract public assignStaticPropertyArrayMulti ( $classEntry, $valueVariable, $propertyName, $offsetExprs, zephir\CompilationContext $compilationContext )
$compilationContext zephir\CompilationContext

assignString() abstract public method

* Assign values to variables
abstract public assignString ( Variable $variable, $value, zephir\CompilationContext $context, $useCodePrinter = true, $doCopy = true )
$variable Variable
$context zephir\CompilationContext

assignZval() abstract public method

abstract public assignZval ( Variable $variable, $code, zephir\CompilationContext $context )
$variable Variable
$context zephir\CompilationContext

callDynamicFunction() abstract public method

* Method calling
abstract public callDynamicFunction ( $symbolVariable, Variable $variable, zephir\CompilationContext $compilationContext, $params = [], $cache = 'NULL', $cacheSlot )
$variable Variable
$compilationContext zephir\CompilationContext

callMethod() abstract public method

abstract public callMethod ( $symbolVariable, Variable $variable, $methodName, $cachePointer, $params, zephir\CompilationContext $context )
$variable Variable
$context zephir\CompilationContext

checkConstructor() abstract public method

abstract public checkConstructor ( Variable $var, zephir\CompilationContext $context )
$var Variable
$context zephir\CompilationContext

checkStrictType() abstract public method

abstract public checkStrictType ( $type, $var, zephir\CompilationContext $context )
$context zephir\CompilationContext

concatSelf() abstract public method

abstract public concatSelf ( Variable $variable, Variable $itemVariable, zephir\CompilationContext $context )
$variable Variable
$itemVariable Variable
$context zephir\CompilationContext

copyOnWrite() abstract public method

abstract public copyOnWrite ( Variable $target, $var, zephir\CompilationContext $context )
$target Variable
$context zephir\CompilationContext

createClosure() abstract public method

abstract public createClosure ( Variable $variable, $classDefinition, zephir\CompilationContext $context )
$variable Variable
$context zephir\CompilationContext

declareConstant() abstract public method

abstract public declareConstant ( $type, $name, $value, zephir\CompilationContext $context )
$context zephir\CompilationContext

destroyIterator() abstract public method

abstract public destroyIterator ( Variable $iteratorVariable, zephir\CompilationContext $context )
$iteratorVariable Variable
$context zephir\CompilationContext

fetchClass() abstract public method

abstract public fetchClass ( Variable $var, $name, $guarded, zephir\CompilationContext $context )
$var Variable
$context zephir\CompilationContext

fetchClassEntry() abstract public method

abstract public fetchClassEntry ( $str )

fetchGlobal() abstract public method

abstract public fetchGlobal ( Variable $globalVar, zephir\CompilationContext $compilationContext, $useCodePrinter = true )
$globalVar Variable
$compilationContext zephir\CompilationContext

fetchProperty() abstract public method

abstract public fetchProperty ( Variable $symbolVariable, Variable $variableVariable, $property, $readOnly, zephir\CompilationContext $context, $useOptimized = false )
$symbolVariable Variable
$variableVariable Variable
$context zephir\CompilationContext

fetchStaticProperty() abstract public method

abstract public fetchStaticProperty ( Variable $symbolVariable, $classDefinition, $property, $readOnly, zephir\CompilationContext $context )
$symbolVariable Variable
$context zephir\CompilationContext

forStatement() abstract public method

* For statement
abstract public forStatement ( Variable $exprVariable, $keyVariable, $variable, $duplicateKey, $duplicateHash, $statement, $statementBlock, zephir\CompilationContext $context )
$exprVariable Variable
$context zephir\CompilationContext

forStatementIterator() abstract public method

abstract public forStatementIterator ( Variable $iteratorVariable, Variable $targetVariable, zephir\CompilationContext $compilationContext )
$iteratorVariable Variable
$targetVariable Variable
$compilationContext zephir\CompilationContext

generateInitCode() abstract public method

abstract public generateInitCode ( &$groupVariables, $type, $pointer, Variable $variable )
$variable Variable

getActiveBackend() public static method

public static getActiveBackend ( )

getBoolCode() abstract public method

abstract public getBoolCode ( Variable $variable, zephir\CompilationContext $context, $useCodePrinter = true )
$variable Variable
$context zephir\CompilationContext

getInternalKernelPath() public method

Resolves the path to the source kernel files of the backend
public getInternalKernelPath ( ) : string
return string Absolute path to kernel files

getInternalSignature() abstract public method

abstract public getInternalSignature ( ClassMethod $method, zephir\CompilationContext $context )
$method ClassMethod
$context zephir\CompilationContext

getInternalTemplatePath() public method

Resolves the path to the source template files of the backend
public getInternalTemplatePath ( ) : string
return string Absolute path to template files

getName() public method

public getName ( )

getScalarTempVariable() abstract public method

abstract public getScalarTempVariable ( $type, zephir\CompilationContext $compilationContext, $isLocal = true )
$compilationContext zephir\CompilationContext

getStringsManager() abstract public method

abstract public getStringsManager ( )

getTemplateFileContents() public method

Resolves the path to the source template file of the backend
public getTemplateFileContents ( $filename ) : string
return string Absolute path to template file

getTypeDefinition() abstract public method

abstract public getTypeDefinition ( $type )

getTypeofCondition() abstract public method

abstract public getTypeofCondition ( Variable $variableVariable, $operator, $value, zephir\CompilationContext $context )
$variableVariable Variable
$context zephir\CompilationContext

getVariableCode() abstract public method

abstract public getVariableCode ( Variable $variable ) : string
$variable Variable
return string

getVariableCodePointer() abstract public method

Get a double pointer to the variable
abstract public getVariableCodePointer ( Variable $variable ) : string
$variable Variable
return string

ifVariableValueUndefined() abstract public method

abstract public ifVariableValueUndefined ( Variable $var, zephir\CompilationContext $context, $onlyBody = false, $useCodePrinter = true )
$var Variable
$context zephir\CompilationContext

initArray() abstract public method

abstract public initArray ( Variable $variable, zephir\CompilationContext $context, $size = null, $useCodePrinter = true )
$variable Variable
$context zephir\CompilationContext

initObject() abstract public method

abstract public initObject ( Variable $variable, $ce, zephir\CompilationContext $context, $useCodePrinter = true )
$variable Variable
$context zephir\CompilationContext

initVar() abstract public method

abstract public initVar ( Variable $variable, zephir\CompilationContext $context, $useCodePrinter = true, $second = false )
$variable Variable
$context zephir\CompilationContext

maybeSeparate() abstract public method

abstract public maybeSeparate ( Variable $variableTempSeparated, Variable $variable, zephir\CompilationContext $context )
$variableTempSeparated Variable
$variable Variable
$context zephir\CompilationContext

onPostCompile() abstract public method

abstract public onPostCompile ( $method, zephir\CompilationContext $context )
$context zephir\CompilationContext

onPreCompile() abstract public method

abstract public onPreCompile ( $method, zephir\CompilationContext $context )
$context zephir\CompilationContext

onPreInitVar() abstract public method

abstract public onPreInitVar ( $method, zephir\CompilationContext $context )
$context zephir\CompilationContext

propertyIsset() abstract public method

abstract public propertyIsset ( Variable $var, $key, zephir\CompilationContext $context )
$var Variable
$context zephir\CompilationContext

returnString() abstract public method

abstract public returnString ( $value, zephir\CompilationContext $context, $useCodePrinter = true )
$context zephir\CompilationContext

setSymbolIfSeparated() abstract public method

abstract public setSymbolIfSeparated ( Variable $variableTempSeparated, Variable $variable, zephir\CompilationContext $context )
$variableTempSeparated Variable
$variable Variable
$context zephir\CompilationContext

updateArray() abstract public method

abstract public updateArray ( Variable $symbolVariable, $key, $value, zephir\CompilationContext $compilationContext, $flags = null )
$symbolVariable Variable
$compilationContext zephir\CompilationContext

updateProperty() abstract public method

abstract public updateProperty ( Variable $symbolVariable, $propertyName, $value, zephir\CompilationContext $compilationContext )
$symbolVariable Variable
$compilationContext zephir\CompilationContext

updateStaticProperty() abstract public method

abstract public updateStaticProperty ( $classEntry, $property, $value, zephir\CompilationContext $context )
$context zephir\CompilationContext

zvalOperator() abstract public method

abstract public zvalOperator ( $zvalOperator, Variable $expected, Variable $variableLeft, Variable $variableRight, zephir\CompilationContext $compilationContext )
$expected Variable
$variableLeft Variable
$variableRight Variable
$compilationContext zephir\CompilationContext

Property Details

$config protected_oe property

protected Config,Zephir $config
return Zephir\Config

$name protected_oe property

The name of the backend (e.g. ZendEngine2)
protected string $name
return string