Skip to content

kota-shade/zf-state-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zf-state-machine

Non-deterministic Finite State Machine for Zend Framework.

This module allows you to organize state machine (non-deterministic finite state machines - NFA) in your application. That will allow you to restrict the list of actions in current object state and to perform additional operations during object's transition from one state to another or immediately after the transition.

Application area

Often the application must restrict the access to certain actions on the object. RBAC -modules do these types of restrictions successfully. The RBAC module controls the actions by roles and permissions. But RBAC does not control the possibility of actions depending by the state of the object. For example: the pass ticket system. Bob can edit,view,issue the pass while it is in the draft state, but when the pass is issued Bob can only view it. This task is successfully solved by using a finite state machine (NFA).

The features of this non-deterministic finite state machine are:

  1. [Doctrine2] (http://doctrine2.readthedocs.io/en/stable/tutorials/getting-started.html) is used to describe a list of states, actions and transitions
  2. Standard Zend Framework validators is used to verify what actions are possible for the object.
  3. Function objects (functors) is used to perform additional actions during transition or after it.
  4. There is protection from infinite loops in a recursive NFA calls

English documentation | Russian documentation.

About

Non-deterministic Finite State Machine for Zend Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages