Property | Type | Description | |
---|---|---|---|
$_aliasManager | zephir\AliasManager | ||
$_classDefinition | |||
$_className | |||
$_compiledFile | |||
$_config | zephir\Config | ||
$_external | |||
$_filePath | |||
$_functionDefinitions | zephir\FunctionDefinition[] | ||
$_headerCBlocks | array | ||
$_ir | Original internal representation (IR) of the file | ||
$_logger | zephir\Logger | ||
$_namespace | Namespace of the | ||
$_originalNode |
Method | Description | |
---|---|---|
__construct ( string $className, string $filePath, zephir\Config $config, zephir\Logger $logger ) | CompilerFile constructor | |
addFunction ( |
Adds a function to the function definitions | |
applyClassHeaders ( zephir\CompilationContext $compilationContext ) | ||
checkDependencies ( |
Check dependencies | |
compile ( |
Compiles the file | |
compileClass ( zephir\CompilationContext $compilationContext, string $namespace, array $classStatement ) | Compiles the class/interface contained in the file | |
compileComment ( zephir\CompilationContext $compilationContext, array $topStatement ) | Compiles a comment as a top-level statement | |
compileFunction ( zephir\CompilationContext $compilationContext, zephir\FunctionDefinition $functionDefinition ) | Compiles a function | |
genIR ( |
Compiles the file generating a JSON intermediate representation | |
getClassDefinition ( ) : |
||
getCompiledFile ( ) : string | Returns the path to the compiled file | |
getFilePath ( ) : string | Returns the path to the source file | |
getFunctionDefinitions ( ) | ||
isExternal ( ) : boolean | ||
preCompile ( |
Pre-compiles a Zephir file. Generates the IR and perform basic validations | |
preCompileClass ( zephir\CompilationContext $compilationContext, string $namespace, array $topStatement, array $docblock ) | Creates a definition for a class | |
preCompileInterface ( string $namespace, array $topStatement, array $docblock ) | Creates a definition for an interface | |
setIsExternal ( boolean $external ) | Sets if the class belongs to an external dependency or not |
Method | Description | |
---|---|---|
_processShorcuts ( array $property, |
Creates the property shortcuts | |
createReturnsType ( array $types ) : array | null | ||
getFullName ( string $name ) : string | Transform class/interface name to FQN format |
public __construct ( string $className, string $filePath, zephir\Config $config, zephir\Logger $logger ) | ||
$className | string | |
$filePath | string | |
$config | zephir\Config | |
$logger | zephir\Logger |
protected _processShorcuts ( array $property, |
||
$property | array | |
$classDefinition |
public addFunction ( |
||
$compiler | ||
$func | zephir\FunctionDefinition | |
$statement | array |
public applyClassHeaders ( zephir\CompilationContext $compilationContext ) | ||
$compilationContext | zephir\CompilationContext |
public checkDependencies ( |
||
$compiler |
public compile ( |
||
$compiler | ||
$stringsManager | zephir\StringsManager |
public compileClass ( zephir\CompilationContext $compilationContext, string $namespace, array $classStatement ) | ||
$compilationContext | zephir\CompilationContext | |
$namespace | string | |
$classStatement | array |
public compileComment ( zephir\CompilationContext $compilationContext, array $topStatement ) | ||
$compilationContext | zephir\CompilationContext | |
$topStatement | array |
public compileFunction ( zephir\CompilationContext $compilationContext, zephir\FunctionDefinition $functionDefinition ) | ||
$compilationContext | zephir\CompilationContext | |
$functionDefinition | zephir\FunctionDefinition |
public getClassDefinition ( ) : |
||
return |
public getCompiledFile ( ) : string | ||
return | string |
public getFilePath ( ) : string | ||
return | string |
protected getFullName ( string $name ) : string | ||
$name | string | |
return | string |
public preCompile ( |
||
$compiler |
public setIsExternal ( boolean $external ) | ||
$external | boolean |
protected AliasManager,zephir $_aliasManager | ||
return | zephir\AliasManager |
protected ClassDefinition,zephir $_classDefinition | ||
return |
protected FunctionDefinition[],zephir $_functionDefinitions | ||
return | zephir\FunctionDefinition[] |