category |
Zend |
package |
Zend_CodeGenerator |
copyright |
Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license |
New BSD License |
inherited_from |
\Zend_CodeGenerator_Php_Abstract |
Methods
__construct()
__construct(array $options = array()
)
Inherited
Parameters
$options
array
__toString() - casting to a string will in turn call generate()
__toString() : string
Inherited
fromReflectedFileName() - use this if you intend on generating code generation objects based on the same file.
fromReflectedFileName(string $filePath, boolean $usePreviousCodeGeneratorIfItExists = true
, boolean $includeIfNotAlreadyIncluded = true
) : \Zend_CodeGenerator_Php_File
Static
This will keep previous changes to the file in tact during the same PHP process
Parameters
$filePath
string
$usePreviousCodeGeneratorIfItExists
boolean
$includeIfNotAlreadyIncluded
boolean
Returns
\Zend_CodeGenerator_Php_File
fromReflection()
fromReflection(\Zend_Reflection_File $reflectionFile) : \Zend_CodeGenerator_Php_File
Static
Parameters
$reflectionFile
\Zend_Reflection_File
Returns
\Zend_CodeGenerator_Php_File
generate()
generate() : string
generate() - must be implemented by the child
generate()
Inherited
getBody()
getBody() : string
getClass()
getClass(string $name = null
) : \Zend_CodeGenerator_Php_Class
Parameters
$name
string
Returns
\Zend_CodeGenerator_Php_Class
getClasses()
getClasses() : array
Returns
array
Array of Zend_CodeGenerator_Php_Class
Get docblock
getDocblock() : \Zend_CodeGenerator_Php_Docblock
Returns
\Zend_CodeGenerator_Php_Docblock
getFilename()
getFilename() : string
getIndentation()
getIndentation() : string | integer
Inherited
getRequiredFiles()
getRequiredFiles() : array
getSourceContent()
getSourceContent() : string
Inherited
isSourceDirty()
isSourceDirty() : boolean
inherited_from |
\Zend_CodeGenerator_Php_Abstract::isSourceDirty() |
Returns
boolean
isSourceDirty()
isSourceDirty() : boolean
Inherited
registerFileCodeGenerator()
registerFileCodeGenerator(\Zend_CodeGenerator_Php_File $fileCodeGenerator, $fileName = null
)
Static
Parameters
$fileCodeGenerator
$fileName
setBody()
setBody(string $body) : \Zend_CodeGenerator_Php_File
Parameters
$body
string
Returns
\Zend_CodeGenerator_Php_File
setClass()
setClass(\Zend_CodeGenerator_Php_Class|array $class) : \Zend_CodeGenerator_Php_File
Parameters
$class
\Zend_CodeGenerator_Php_Class
array
Returns
\Zend_CodeGenerator_Php_File
setClasses()
setClasses(array $classes) : \Zend_CodeGenerator_Php_File
Parameters
$classes
array
Returns
\Zend_CodeGenerator_Php_File
setConfig()
setConfig(\Zend_Config $config) : \Zend_CodeGenerator_Abstract
Inherited
Parameters
$config
\Zend_Config
Returns
\Zend_CodeGenerator_Abstract
setDocblock() Set the docblock
setDocblock(\Zend_CodeGenerator_Php_Docblock|array|string $docblock) : \Zend_CodeGenerator_Php_File
Parameters
$docblock
\Zend_CodeGenerator_Php_Docblock
array
string
Returns
\Zend_CodeGenerator_Php_File
setFilename()
setFilename(string $filename) : \Zend_CodeGenerator_Php_File
Parameters
$filename
string
Returns
\Zend_CodeGenerator_Php_File
setIndentation()
setIndentation(string|integer $indentation) : \Zend_CodeGenerator_Php_Abstract
Inherited
Parameters
$indentation
string
integer
Returns
\Zend_CodeGenerator_Php_Abstract
setOptions()
setOptions(array $options) : \Zend_CodeGenerator_Abstract
Inherited
Parameters
$options
array
Returns
\Zend_CodeGenerator_Abstract
setRequiredFiles
setRequiredFiles(array $requiredFiles) : \Zend_CodeGenerator_Php_File
Parameters
$requiredFiles
array
Returns
\Zend_CodeGenerator_Php_File
setSourceContent()
setSourceContent(string $sourceContent)
Inherited
Parameters
$sourceContent
string
setSourceDirty()
setSourceDirty(boolean $isSourceDirty = true
) : \Zend_CodeGenerator_Php_Abstract
Inherited
Parameters
$isSourceDirty
boolean
Returns
\Zend_CodeGenerator_Php_Abstract
_init() - this is called before the constuctor
_init()
Inherited
_prepare() - this is called at construction completion
_prepare()
Inherited
Properties
$_classes
$_classes : array
$_docblock
$_docblock : \Zend_CodeGenerator_Php_Docblock
Array of Zend_CodeGenerator_Php_File
$_fileCodeGenerators : array
Static
$_filename
$_filename : string
$_indentation
$_indentation : integer | string
$_isSourceDirty
$_isSourceDirty : boolean
$_markerClass
$_markerClass
Default
'/* Zend_CodeGenerator_Php_File-ClassMarker: {?} */'
Static
$_markerDocblock
$_markerDocblock
Default
'/* Zend_CodeGenerator_Php_File-DocblockMarker */'
Static
$_markerRequire
$_markerRequire
Default
'/* Zend_CodeGenerator_Php_File-RequireMarker: {?} */'
Static
$_requiredFiles
$_requiredFiles : array
$_sourceContent
$_sourceContent : string
Constants
Line feed to use in place of EOL
LINE_FEED = "\n"