Jibraaaaaaan!

Component ID

2515096

Component name

Jibraaaaaaan!

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Jibraaaaaaan is a finite state machine implementation done with an extensible hook mechanism. It is designed for developers, and is very, very easy to use... at least for some definitions of 'easy'... and 'very'... and 'use'.

For example, if you want a finite state machine with seven steps (including init and finish), you would simply create a module (we'll call it "selfie") that defines these seven functions:

function selfie_jibran(&$data, &$next_step) {}
function selfie_jibraan(&$data, &$next_step) {}
function selfie_jibraaan(&$data, &$next_step) {}
function selfie_jibraaaan(&$data, &$next_step) {}
function selfie_kibraaaaan(&$data, &$next_step) {}
function selfie_jibraaaaaan(&$data, &$next_step) {}
function selfie_jibraaaaaaan(&$data, &$next_step) {}

Want eight steps? Just add...

function selfie_jibraaaaaaaan(&$data, &$next_step) {}

From there, you can just call the master Jibraaaaaaan function to kick of the FSM:

jibaaaaaaan_this_is_a_selfie('selfie');

Want to execute all of the Jibran FSMs on your system? (Yeah, that's a good idea!) Just call the above without any parameters:

jibraaaaaaan_this_is_a_selfie();