PHP Class raoul2000\workflow\source\file\PhpArrayLoader

The PHP filename is built by concatenating the $path and the $workflowId values, adding the '.php' extension. This file must return the workflow definition in the form of an associative array having the appropriate structure depending on the configured parser.
Inheritance: extends WorkflowDefinitionLoader
Show file Open project: raoul2000/yii2-workflow

Public Properties

Property Type Description
$path path where the php file to load is located

Public Methods

Method Description
createFilename ( string $workflowId ) : string Creates and returns the absolute filename of the PHP file that contains the workflow definition to load.
loadDefinition ( string $workflowId, WorkflowFileSource $source ) : array Loads and returns the workflow definition available as a PHP array in a file.

Method Details

createFilename() public method

Creates and returns the absolute filename of the PHP file that contains the workflow definition to load.
public createFilename ( string $workflowId ) : string
$workflowId string
return string the absolute file path of the workflow definition file

loadDefinition() public method

If a parser has been configured, it is used to converte the array structure defined in the file, into the format expected by the WorkflowFileSource class.
public loadDefinition ( string $workflowId, WorkflowFileSource $source ) : array
$workflowId string
$source WorkflowFileSource
return array the workflow definition

Property Details

$path public property

path where the php file to load is located
public $path