PHP Class Phalcon\Build\Generator_File_PhalconH

Afficher le fichier Open project: phalcon/cphalcon

Protected Properties

Свойство Type Description
$outputFile string Path of generated phalcon.h file
$sourceDir string Directory with Phalcon source code

Méthodes publiques

Méthode Description
__construct ( string $sourceDir, string $outputDir )
generate ( ) : array Create phalcon.h by processing phalcon.h in sources directory: - Remove all extern declarations - Replace #include with the direct file content Return list of header files that are included in the generated phalcon.h

Méthodes protégées

Méthode Description
appendFileAndReferencedHeaders ( resource $fileHandle, string $filePath ) : array Add source of $filePath, processing its content.
cleanExtern ( string $line ) : string Remove 'extern ' declaration from the source file line
getCleanHeaderFileContent ( string $file ) : string Return content of the header file, where comments like license notices are removed and no 'extern's present.
limitVisibilityOfPhalconFuncs ( ) Go through the generated file and put 'static' to all declarations of Phalcon-related functions

Method Details

__construct() public méthode

public __construct ( string $sourceDir, string $outputDir )
$sourceDir string
$outputDir string

appendFileAndReferencedHeaders() protected méthode

Also includes content of files, referenced from $filePath.
protected appendFileAndReferencedHeaders ( resource $fileHandle, string $filePath ) : array
$fileHandle resource
$filePath string
Résultat array

cleanExtern() protected méthode

Remove 'extern ' declaration from the source file line
protected cleanExtern ( string $line ) : string
$line string
Résultat string

generate() public méthode

Create phalcon.h by processing phalcon.h in sources directory: - Remove all extern declarations - Replace #include with the direct file content Return list of header files that are included in the generated phalcon.h
public generate ( ) : array
Résultat array

getCleanHeaderFileContent() protected méthode

Overall, removing comments is not necessary for putting result to a merged file, we just don't want to put license notices for every included file.
protected getCleanHeaderFileContent ( string $file ) : string
$file string
Résultat string

limitVisibilityOfPhalconFuncs() protected méthode

Go through the generated file and put 'static' to all declarations of Phalcon-related functions

Property Details

$outputFile protected_oe property

Path of generated phalcon.h file
protected string $outputFile
Résultat string

$sourceDir protected_oe property

Directory with Phalcon source code
protected string $sourceDir
Résultat string