Property | Type | Description | |
---|---|---|---|
$backend | |||
$functionDefinitions | zephir\FunctionDefinition[] | ||
$parserCompiled |
Property | Type | Description | |
---|---|---|---|
$anonymousFiles | array | string[] | ||
$compiledFiles | array | string[] | ||
$config | zephir\Config | ||
$constants | |||
$currentVersion | string | ||
$definitions | |||
$externalDependencies | array | External dependencies | |
$extraFiles | array | ||
$fcallManager | |||
$files | |||
$globals | array | Extension globals | |
$internalDefinitions | ReflectionClass[] | ||
$internalInitializers | array | Additional initializer code used for static property initialization | |
$loadedPrototypes | boolean | ||
$logger | zephir\Logger | ||
$stringManager | zephir\StringsManager |
Method | Description | |
---|---|---|
__construct ( zephir\Config $config, zephir\Logger $logger, |
Compiler constructor | |
addClassDefinition ( |
Inserts an anonymous class definition in the compiler | |
addExternalDependency ( string $namespace, string $location ) | Adds an external dependency to the compiler | |
addFunction ( zephir\FunctionDefinition $func, array $statement = null ) | Adds a function to the function definitions | |
api ( Zephir\Commands\CommandInterface $command, boolean $fromGenerate = false ) | Generate a HTML API | |
build ( Zephir\Commands\CommandInterface $command ) | Compiles and installs the extension | |
buildDev ( Zephir\Commands\CommandInterface $command ) | Compiles and installs the extension in development mode (debug symbols and no optimizations) | |
calculateDependencies ( $files, $_dependency = null ) | ||
checkIfPhpized ( ) : boolean | Check if the project must be phpized again | |
clean ( Zephir\Commands\CommandInterface $command ) | Clean the extension directory | |
compile ( Zephir\Commands\CommandInterface $command, boolean $development = false ) | Compiles the extension without installing it | |
compileParser ( ) | Compile the parser PHP extension | |
createConfigFiles ( string $project ) : boolean | Create config.m4 and config.w32 for the extension | |
createProjectFiles ( string $project ) : boolean | Create project.c and project.h according to the current extension | |
fullClean ( Zephir\Commands\CommandInterface $command ) | Clean the extension directory | |
generate ( Zephir\Commands\CommandInterface $command ) : boolean | Generates the C sources from Zephir without compiling them | |
generateFunctionInformation ( ) | ||
generatePackageDependenciesM4 ( $contentM4 ) : string | Generate package-dependencies config for m4 | |
getClassDefinition ( string $className ) : |
Returns class the class definition from a given class name | |
getConfig ( ) : zephir\Config | Returns the internal config | |
getConstant ( string $name ) | Returns a Zephir Constant by its name | |
getCurrentVersion ( ) : string | Returns the current version + the ident if available | |
getExtensionGlobal ( string $name ) : boolean | Returns a extension global by its name | |
getFileSystem ( ) : |
Returns the internal filesystem handler | |
getGccFlags ( boolean $development = false ) : string | Returns GCC flags for current compilation | |
getInternalClassDefinition ( string $className ) : |
Returns class the class definition from a given class name | |
getLogger ( ) : zephir\Logger | Returns the internal logger | |
getPhpIncludeDirs ( ) : string | Returns the php include directories returned by php-config | |
getShortPath ( string $path ) : string | Returns a short path | |
getShortUserPath ( string $path ) : string | Returns a short user path | |
init ( Zephir\Commands\CommandInterface $command ) | Initializes a Zephir extension | |
install ( Zephir\Commands\CommandInterface $command, boolean $development = false ) | Compiles and installs the extension | |
isBundledClass ( string $className ) : boolean | Allows to check if a class is part of PHP | |
isBundledInterface ( string $className ) : boolean | Allows to check if a interface is part of PHP | |
isClass ( string $className ) : boolean | Allows to check if a class is part of the compiled extension | |
isConstant ( string $name ) : boolean | Checks if $name is a Zephir constant | |
isExtensionGlobal ( string $name ) : boolean | Checks if a specific extension global is defined | |
isInterface ( string $className ) : boolean | Allows to check if an interface is part of the compiled extension | |
loadExternalClass ( string $className, string $location ) : boolean | Loads a class definition in an external dependency | |
preCompileHeaders ( ) | Pre-compile headers to speed up compilation | |
processCodeInjection ( array $entries ) : array | Process extension code injection | |
processExtensionGlobals ( string $namespace ) : array | Process extension globals | |
processExtensionInfo ( ) : string | Generates phpinfo() sections showing information about the extension | |
setExtensionGlobals ( array $globals ) | Sets extensions globals | |
stubs ( Zephir\Commands\CommandInterface $command, boolean $fromGenerate = false ) | Generate IDE stubs | |
test ( Zephir\Commands\CommandInterface $command ) | Run tests |
Method | Description | |
---|---|---|
checkDirectory ( ) : string | Checks if the current directory is a valid Zephir project | |
checkKernelFile ( string $src, string $dst ) : boolean | Checks if a file must be copied | |
checkKernelFiles ( ) : boolean | Checks which files in the base kernel must be copied | |
checkRequires ( ) | Check require extensions orther when build your extension | |
getGccVersion ( ) : string | Returns current GCC version | |
loadConstantsSources ( array $constantsSources ) | Registers C-constants as PHP constants from a C-file | |
preCompile ( string $filePath ) | Pre-compiles classes creating a CompilerFile definition | |
processAddSources ( array $sources, string $project ) : array | Process config.w32 sections | |
recursiveDeletePath ( string $path, string $mask ) | Recursively deletes files in a specified location | |
recursivePreCompile ( string $path ) | Recursively pre-compiles all sources found in the given path | |
recursiveProcess ( $src, $dest, string $pattern = null, mixed $callback = "copy" ) : boolean | Copies the base kernel to the extension destination |
public __construct ( zephir\Config $config, zephir\Logger $logger, |
||
$config | zephir\Config | |
$logger | zephir\Logger | |
$backend |
public addClassDefinition ( |
||
$file | ||
$classDefinition |
public addExternalDependency ( string $namespace, string $location ) | ||
$namespace | string | |
$location | string |
public addFunction ( zephir\FunctionDefinition $func, array $statement = null ) | ||
$func | zephir\FunctionDefinition | |
$statement | array |
public build ( Zephir\Commands\CommandInterface $command ) | ||
$command | Zephir\Commands\CommandInterface |
public buildDev ( Zephir\Commands\CommandInterface $command ) | ||
$command | Zephir\Commands\CommandInterface |
protected checkDirectory ( ) : string | ||
return | string |
public checkIfPhpized ( ) : boolean | ||
return | boolean |
protected checkKernelFiles ( ) : boolean | ||
return | boolean |
protected checkRequires ( ) |
public clean ( Zephir\Commands\CommandInterface $command ) | ||
$command | Zephir\Commands\CommandInterface |
public createConfigFiles ( string $project ) : boolean | ||
$project | string | |
return | boolean | true if need to run configure TODO: move this to backend? |
public createProjectFiles ( string $project ) : boolean | ||
$project | string | |
return | boolean | TODO: Move the part of the logic which depends on templates (backend-specific) to backend? |
public fullClean ( Zephir\Commands\CommandInterface $command ) | ||
$command | Zephir\Commands\CommandInterface |
public generatePackageDependenciesM4 ( $contentM4 ) : string | ||
$contentM4 | ||
return | string | TODO: Move the template depending part to backend? |
public getClassDefinition ( string $className ) : |
||
$className | string | |
return | returns false if no class definition is found |
public getConfig ( ) : zephir\Config | ||
return | zephir\Config |
public getConstant ( string $name ) | ||
$name | string |
public static getCurrentVersion ( ) : string | ||
return | string |
public getExtensionGlobal ( string $name ) : boolean | ||
$name | string | |
return | boolean |
public getFileSystem ( ) : |
||
return |
public getGccFlags ( boolean $development = false ) : string | ||
$development | boolean | |
return | string |
protected getGccVersion ( ) : string | ||
return | string |
public getInternalClassDefinition ( string $className ) : |
||
$className | string | |
return |
public getLogger ( ) : zephir\Logger | ||
return | zephir\Logger |
public getPhpIncludeDirs ( ) : string | ||
return | string |
public static getShortPath ( string $path ) : string | ||
$path | string | |
return | string |
public static getShortUserPath ( string $path ) : string | ||
$path | string | |
return | string |
public init ( Zephir\Commands\CommandInterface $command ) | ||
$command | Zephir\Commands\CommandInterface |
public isBundledClass ( string $className ) : boolean | ||
$className | string | |
return | boolean |
public isBundledInterface ( string $className ) : boolean | ||
$className | string | |
return | boolean |
public isConstant ( string $name ) : boolean | ||
$name | string | |
return | boolean |
public isExtensionGlobal ( string $name ) : boolean | ||
$name | string | |
return | boolean |
public isInterface ( string $className ) : boolean | ||
$className | string | |
return | boolean |
protected loadConstantsSources ( array $constantsSources ) | ||
$constantsSources | array |
protected preCompile ( string $filePath ) | ||
$filePath | string |
public preCompileHeaders ( ) |
public processCodeInjection ( array $entries ) : array | ||
$entries | array | |
return | array |
public processExtensionGlobals ( string $namespace ) : array | ||
$namespace | string | |
return | array |
public processExtensionInfo ( ) : string | ||
return | string |
protected recursiveDeletePath ( string $path, string $mask ) | ||
$path | string | |
$mask | string |
protected recursivePreCompile ( string $path ) | ||
$path | string |
public setExtensionGlobals ( array $globals ) | ||
$globals | array |
public test ( Zephir\Commands\CommandInterface $command ) | ||
$command | Zephir\Commands\CommandInterface |
protected ClassDefinition[],zephir $definitions | ||
return |
protected array $externalDependencies | ||
return | array |
protected FcallManager,Zephir\Backends\ZendEngine3|FcallManager,Zephir\Backends\ZendEngine2 $fcallManager | ||
return |
public FunctionDefinition[],zephir $functionDefinitions | ||
return | zephir\FunctionDefinition[] |
protected static ReflectionClass[] $internalDefinitions | ||
return | ReflectionClass[] |
protected array $internalInitializers | ||
return | array |