PHP Класс ezcWorkflowDefinitionStorageXml, Workflow

The definitions are stored inside the directory specified to the constructor with the name: [workflowName]_[workflowVersion].xml where the name of the workflow has dots and spaces replaced by '_'.
Наследование: implements ezcWorkflowDefinitionStorage
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$directory string The directory that holds the XML files.

Открытые методы

Метод Описание
__construct ( string $directory = '' ) Constructs a new definition loader that loads definitions from $directory.
conditionToXml ( ezcWorkflowCondition $condition, DOMDocument $document ) : DOMElement "Convert" an ezcWorkflowCondition object into an DOMElement object.
loadByName ( string $workflowName, integer $workflowVersion ) : ezcWorkflow Load a workflow definition from a file.
loadFromDocument ( DOMDocument $document ) : ezcWorkflow Load a workflow definition from a DOMDocument.
save ( ezcWorkflow $workflow ) Save a workflow definition to a file.
saveToDocument ( ezcWorkflow $workflow, integer $workflowVersion ) : DOMDocument Save a workflow definition to a DOMDocument.
variableToXml ( mixed $variable, DOMDocument $document ) : DOMElement "Convert" a PHP variable into an DOMElement object.
xmlToCondition ( DOMElement $element ) : ezcWorkflowCondition "Convert" an DOMElement object into an ezcWorkflowCondition object.
xmlToVariable ( DOMElement $element ) : mixed "Convert" an DOMElement object into a PHP variable.

Защищенные методы

Метод Описание
getCurrentVersion ( string $workflowName ) : integer Returns the current version number for a given workflow name.
getFilename ( string $workflowName, integer $workflowVersion ) : string Returns the filename with path for given workflow name and version.
getFilesystemWorkflowName ( string $workflowName ) : string Returns a safe filesystem name for a given workflow.

Описание методов

__construct() публичный Метод

$directory must contain the trailing '/'
public __construct ( string $directory = '' )
$directory string The directory that holds the XML files.

conditionToXml() публичный статический Метод

"Convert" an ezcWorkflowCondition object into an DOMElement object.
public static conditionToXml ( ezcWorkflowCondition $condition, DOMDocument $document ) : DOMElement
$condition ezcWorkflowCondition
$document DOMDocument
Результат DOMElement

getCurrentVersion() защищенный Метод

Returns the current version number for a given workflow name.
protected getCurrentVersion ( string $workflowName ) : integer
$workflowName string
Результат integer

getFilename() защищенный Метод

The name of the workflow file is of the format [workFlowName]_[workFlowVersion].xml
protected getFilename ( string $workflowName, integer $workflowVersion ) : string
$workflowName string
$workflowVersion integer
Результат string

getFilesystemWorkflowName() защищенный Метод

This method replaces whitespace and '.' with '_'.
protected getFilesystemWorkflowName ( string $workflowName ) : string
$workflowName string
Результат string

loadByName() публичный Метод

When the $workflowVersion argument is omitted, the most recent version is loaded.
public loadByName ( string $workflowName, integer $workflowVersion ) : ezcWorkflow
$workflowName string
$workflowVersion integer
Результат ezcWorkflow

loadFromDocument() публичный Метод

Load a workflow definition from a DOMDocument.
public loadFromDocument ( DOMDocument $document ) : ezcWorkflow
$document DOMDocument
Результат ezcWorkflow

save() публичный Метод

Save a workflow definition to a file.
public save ( ezcWorkflow $workflow )
$workflow ezcWorkflow

saveToDocument() публичный Метод

Save a workflow definition to a DOMDocument.
public saveToDocument ( ezcWorkflow $workflow, integer $workflowVersion ) : DOMDocument
$workflow ezcWorkflow
$workflowVersion integer
Результат DOMDocument

variableToXml() публичный статический Метод

"Convert" a PHP variable into an DOMElement object.
public static variableToXml ( mixed $variable, DOMDocument $document ) : DOMElement
$variable mixed
$document DOMDocument
Результат DOMElement

xmlToCondition() публичный статический Метод

"Convert" an DOMElement object into an ezcWorkflowCondition object.
public static xmlToCondition ( DOMElement $element ) : ezcWorkflowCondition
$element DOMElement
Результат ezcWorkflowCondition

xmlToVariable() публичный статический Метод

"Convert" an DOMElement object into a PHP variable.
public static xmlToVariable ( DOMElement $element ) : mixed
$element DOMElement
Результат mixed

Описание свойств

$directory защищенное свойство

The directory that holds the XML files.
protected string $directory
Результат string