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
파일 보기 프로젝트 열기: zetacomponents/workflow 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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