Smalldb  v0.0-177-g1a83180
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ActionBlock Class Reference

Universal implemntation of state machine action invocation. More...

Inheritance diagram for ActionBlock:
Inheritance graph

Public Member Functions

 __construct ($machine, $action, $action_desc)
 Setup block to act as expected. More...
 
 main ()
 Block body. More...
 

Public Attributes

const force_exec = true
 Block must be always executed.
 

Protected Attributes

 $inputs
 Block inputs. More...
 
 $outputs
 Block outputs. More...
 
 $machine
 State machine.
 
 $action
 Name of the action to invoke.
 
 $output_values
 How block outputs should be set after action is finished.
 

Detailed Description

Universal implemntation of state machine action invocation.

Inputs are passed as arguments to the transition, returned value is set on one or more outputs.

Output 'done' is set to true if return value of transition is not FALSE.

Constructor & Destructor Documentation

__construct (   $machine,
  $action,
  $action_desc 
)

Setup block to act as expected.

Configuration is done by BlockStorage.

Member Function Documentation

main ( )

Block body.

Todo:
Should machine be able to create null ref?
Todo:
Handle exceptions

Member Data Documentation

$inputs
protected
Initial value:
= array(
'*' => null,
)

Block inputs.

$outputs
protected
Initial value:
= array(
'*' => true,
'done' => true,
)

Block outputs.