eZ Publish  [trunk]
eZCodeTemplate Class Reference

Replaces or generates blocks of code according to a template file. More...

List of all members.

Public Member Functions

 apply ($filePath, $checkOnly=false)
 eZCodeTemplate ()
 templateFile ($templateName)

Static Public Member Functions

 allCodeFiles ()

Public Attributes

 $Templates
const STATUS_FAILED = 0
 There are errors in the template code.
const STATUS_NO_CHANGE = 2
 Code file was updated, but no new elements has been added.
const STATUS_OK = 1
 Code files was succesfully updated.

Detailed Description

Replaces or generates blocks of code according to a template file.

Definition at line 17 of file ezcodetemplate.php.


Member Function Documentation

Finds all PHP files which must be updated and returns them as an array.

The files are defined in codetemplate.ini in the variable PHPFiles

Definition at line 358 of file ezcodetemplate.php.

eZCodeTemplate::apply ( filePath,
checkOnly = false 
)

Applies template block in the file $filePath and writes back the new code to the same file.

Returns:
One of the EZ_CODE_TEMPLATE_STATUS_* status codes.
Note:
It will create a backup file of the original

Definition at line 54 of file ezcodetemplate.php.

Constructor

Definition at line 31 of file ezcodetemplate.php.

eZCodeTemplate::templateFile ( templateName)
Returns:
The name of the template file based on the name $templateName or false if no file is defined for the name.

Definition at line 343 of file ezcodetemplate.php.

Referenced by apply().


Member Data Documentation

eZCodeTemplate::$Templates

Definition at line 365 of file ezcodetemplate.php.

There are errors in the template code.

Definition at line 20 of file ezcodetemplate.php.

Referenced by apply().

Code file was updated, but no new elements has been added.

Definition at line 26 of file ezcodetemplate.php.

Referenced by apply().

Code files was succesfully updated.

Definition at line 23 of file ezcodetemplate.php.

Referenced by apply().


The documentation for this class was generated from the following file: