Zend Framework  1.12
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Zend_CodeGenerator_Php_File Class Reference

Public Member Functions

 setDocblock ($docblock)
 setDocblock() Set the docblock
 
 getDocblock ()
 Get docblock.
 
 setRequiredFiles ($requiredFiles)
 setRequiredFiles
 
 getRequiredFiles ()
 getRequiredFiles()
 
 setClasses (Array $classes)
 setClasses()
 
 getClass ($name=null)
 getClass()
 
 setClass ($class)
 setClass()
 
 setFilename ($filename)
 setFilename()
 
 getFilename ()
 getFilename()
 
 getClasses ()
 getClasses()
 
 setBody ($body)
 setBody()
 
 getBody ()
 getBody()
 
 isSourceDirty ()
 isSourceDirty()
 
 generate ()
 generate()
 
 write ()
 
- Public Member Functions inherited from Zend_CodeGenerator_Php_Abstract
 setSourceDirty ($isSourceDirty=true)
 setSourceDirty()
 
 isSourceDirty ()
 isSourceDirty()
 
 setIndentation ($indentation)
 setIndentation()
 
 getIndentation ()
 getIndentation()
 
- Public Member Functions inherited from Zend_CodeGenerator_Abstract
 __construct ($options=array())
 __construct()
 
 setConfig (Zend_Config $config)
 setConfig()
 
 setOptions (Array $options)
 setOptions()
 
 setSourceContent ($sourceContent)
 setSourceContent()
 
 getSourceContent ()
 getSourceContent()
 
 generate ()
 generate() - must be implemented by the child
 
 __toString ()
 __toString() - casting to a string will in turn call generate()
 

Static Public Member Functions

static registerFileCodeGenerator (Zend_CodeGenerator_Php_File $fileCodeGenerator, $fileName=null)
 
static fromReflectedFileName ($filePath, $usePreviousCodeGeneratorIfItExists=true, $includeIfNotAlreadyIncluded=true)
 fromReflectedFileName() - use this if you intend on generating code generation objects based on the same file.
 
static fromReflection (Zend_Reflection_File $reflectionFile)
 fromReflection()
 

Protected Attributes

 $_filename = null
 
 $_docblock = null
 
 $_requiredFiles = array()
 
 $_classes = array()
 
 $_body = null
 
- Protected Attributes inherited from Zend_CodeGenerator_Php_Abstract
 $_isSourceDirty = true
 
 $_indentation = ' '
 
- Protected Attributes inherited from Zend_CodeGenerator_Abstract
 $_sourceContent = null
 
 $_isSourceDirty = true
 

Static Protected Attributes

static $_fileCodeGenerators = array()
 
static $_markerDocblock = '/* Zend_CodeGenerator_Php_File-DocblockMarker */'
 
static $_markerRequire = '/* Zend_CodeGenerator_Php_File-RequireMarker: {?} */'
 
static $_markerClass = '/* Zend_CodeGenerator_Php_File-ClassMarker: {?} */'
 

Additional Inherited Members

- Public Attributes inherited from Zend_CodeGenerator_Php_Abstract
const LINE_FEED = "\n"
 Line feed to use in place of EOL.
 
- Protected Member Functions inherited from Zend_CodeGenerator_Abstract
 _init ()
 _init() - this is called before the constuctor
 
 _prepare ()
 _prepare() - this is called at construction completion
 

Member Function Documentation

static fromReflectedFileName (   $filePath,
  $usePreviousCodeGeneratorIfItExists = true,
  $includeIfNotAlreadyIncluded = true 
)
static

fromReflectedFileName() - use this if you intend on generating code generation objects based on the same file.

This will keep previous changes to the file in tact during the same PHP process

Parameters
string$filePath
bool$usePreviousCodeGeneratorIfItExists
bool$includeIfNotAlreadyIncluded
Returns
Zend_CodeGenerator_Php_File
static fromReflection ( Zend_Reflection_File  $reflectionFile)
static
generate ( )

generate()

Returns
string
getBody ( )

getBody()

Returns
string
getClass (   $name = null)

getClass()

Parameters
string$name
Returns
Zend_CodeGenerator_Php_Class
getClasses ( )
getDocblock ( )

Get docblock.

Returns
Zend_CodeGenerator_Php_Docblock
getFilename ( )

getFilename()

Returns
string
getRequiredFiles ( )

getRequiredFiles()

Returns
array
isSourceDirty ( )

isSourceDirty()

Returns
bool
static registerFileCodeGenerator ( Zend_CodeGenerator_Php_File  $fileCodeGenerator,
  $fileName = null 
)
static
setBody (   $body)

setBody()

Parameters
string$body
Returns
Zend_CodeGenerator_Php_File
setClass (   $class)
setClasses ( Array  $classes)

setClasses()

Parameters
array$classes
Returns
Zend_CodeGenerator_Php_File
setDocblock (   $docblock)

setDocblock() Set the docblock

Parameters
Zend_CodeGenerator_Php_Docblock | array | string$docblock
Returns
Zend_CodeGenerator_Php_File
setFilename (   $filename)

setFilename()

Parameters
string$filename
Returns
Zend_CodeGenerator_Php_File
setRequiredFiles (   $requiredFiles)

setRequiredFiles

Parameters
array$requiredFiles
Returns
Zend_CodeGenerator_Php_File
write ( )

Member Data Documentation

$_body = null
protected
$_classes = array()
protected
$_docblock = null
protected
$_fileCodeGenerators = array()
staticprotected
$_filename = null
protected
$_markerClass = '/* Zend_CodeGenerator_Php_File-ClassMarker: {?} */'
staticprotected
$_markerDocblock = '/* Zend_CodeGenerator_Php_File-DocblockMarker */'
staticprotected
$_markerRequire = '/* Zend_CodeGenerator_Php_File-RequireMarker: {?} */'
staticprotected
$_requiredFiles = array()
protected