Class

eZPHPCreator

class eZPHPCreator

Constants

VARIABLE

SPACE

TEXT

METHOD_CALL

CODE_PIECE

EOL_COMMENT

INCLUDE_STATEMENT

VARIABLE_UNSET

DEFINE

VARIABLE_UNSET_LIST

RAW_VARIABLE

VARIABLE_ASSIGNMENT

VARIABLE_APPEND_TEXT

VARIABLE_APPEND_ELEMENT

INCLUDE_ONCE_STATEMENT

INCLUDE_ALWAYS_STATEMENT

METHOD_CALL_PARAMETER_VALUE

METHOD_CALL_PARAMETER_VARIABLE

Properties

$PHPDir
$PHPFile
$FileResource
$Elements
$TextChunks
$isAtomic
$tmpFilename
$requestedFilename
$Spacing
$ClusteringEnabled
$ClusterFileScope

Methods

__construct(string $dir, string $file, string $prefix = '', array $options = array())

Initializes the creator with the directory path $dir and filename $file.

addDefine($name, $value, $caseSensitive = true, $parameters = array())

addRawVariable($name, $value)

addVariable($name, $value, $assignmentType = eZPHPCreator::VARIABLE_ASSIGNMENT, $parameters = array())

addVariableUnset($name, $parameters = array())

addVariableUnsetList($list, $parameters = array())

addSpace($lines = 1)

addText($text)

addMethodCall($objectName, $methodName, $methodParameters, $returnValue = false, $parameters = array())

addCodePiece($code, $parameters = array())

addComment($comment, $eol = true, $whitespaceHandling = true, $parameters = array())

addInclude($file, $type = eZPHPCreator::INCLUDE_ONCE_STATEMENT, $parameters = array())

thisVariableText($value, $column, $iteration, $maxIterations = 2)

open($atomic = false)

close()

exists()

canRestore($timestamp = false)

restore($variableDefinitions)

_restoreCall($path, $mtime, $variableDefinitions)

store($atomic = false)

fetch($addPHPMarkers = true)

writeChunks()

flushChunks()

write($text)

writeElements()

writeDefine($element)

writeInclude($element)

writeComment($element)

writeSpace($element)

writeCodePiece($element)

writeText($element)

writeMethodCall($element)

writeVariableUnset($element)

writeVariableUnsetList($element)

writeRawVariable($variableName, $variableValue)

writeVariable($variableName, $variableValue, $assignmentType = eZPHPCreator::VARIABLE_ASSIGNMENT, $variableParameters = array())

temporaryVariableName($prefix)

Details

at line 84
public __construct(string $dir, string $file, string $prefix = '', array $options = array())

Initializes the creator with the directory path $dir and filename $file.

Parameters

string $dir
string $file
string $prefix
array $options

at line 138
public addDefine($name, $value, $caseSensitive = true, $parameters = array())

Parameters

$name
$value
$caseSensitive
$parameters

at line 159
public addRawVariable($name, $value)

Parameters

$name
$value

at line 193
public addVariable($name, $value, $assignmentType = eZPHPCreator::VARIABLE_ASSIGNMENT, $parameters = array())

Parameters

$name
$value
$assignmentType
$parameters

at line 223
public addVariableUnset($name, $parameters = array())

Parameters

$name
$parameters

at line 251
public addVariableUnsetList($list, $parameters = array())

Parameters

$list
$parameters

at line 270
public addSpace($lines = 1)

Parameters

$lines

at line 287
public addText($text)

Parameters

$text

at line 325
public addMethodCall($objectName, $methodName, $methodParameters, $returnValue = false, $parameters = array())

Parameters

$objectName
$methodName
$methodParameters
$returnValue
$parameters

at line 360
public addCodePiece($code, $parameters = array())

Parameters

$code
$parameters

at line 390
public addComment($comment, $eol = true, $whitespaceHandling = true, $parameters = array())

Parameters

$comment
$eol
$whitespaceHandling
$parameters

at line 421
public addInclude($file, $type = eZPHPCreator::INCLUDE_ONCE_STATEMENT, $parameters = array())

Parameters

$file
$type
$parameters

at line 481
public thisVariableText($value, $column, $iteration, $maxIterations = 2)

Parameters

$value
$column
$iteration
$maxIterations

at line 759
public open($atomic = false)

Parameters

$atomic

at line 797
public close()

at line 821
public exists()

at line 841
public canRestore($timestamp = false)

Parameters

$timestamp

at line 884
public restore($variableDefinitions)

Parameters

$variableDefinitions

at line 908
public _restoreCall($path, $mtime, $variableDefinitions)

Parameters

$path
$mtime
$variableDefinitions

at line 943
public store($atomic = false)

Parameters

$atomic

at line 978
public fetch($addPHPMarkers = true)

Parameters

$addPHPMarkers

at line 998
public writeChunks()

at line 1029
public flushChunks()

at line 1037
public write($text)

Parameters

$text

at line 1045
public writeElements()

at line 1099
public writeDefine($element)

Parameters

$element

at line 1125
public writeInclude($element)

Parameters

$element

at line 1149
public writeComment($element)

Parameters

$element

at line 1179
public writeSpace($element)

Parameters

$element

at line 1188
public writeCodePiece($element)

Parameters

$element

at line 1202
public writeText($element)

Parameters

$element

at line 1213
public writeMethodCall($element)

Parameters

$element

at line 1259
public writeVariableUnset($element)

Parameters

$element

at line 1274
public writeVariableUnsetList($element)

Parameters

$element

at line 1296
public writeRawVariable($variableName, $variableValue)

Parameters

$variableName
$variableValue

at line 1304
public writeVariable($variableName, $variableValue, $assignmentType = eZPHPCreator::VARIABLE_ASSIGNMENT, $variableParameters = array())

Parameters

$variableName
$variableValue
$assignmentType
$variableParameters

at line 1325
public temporaryVariableName($prefix)

Parameters

$prefix