Download the PHP package metabor/statemachine-example without Composer
On this page you can find all versions of the php package metabor/statemachine-example. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download metabor/statemachine-example
More information about metabor/statemachine-example
Files in metabor/statemachine-example
Package statemachine-example
Short Description Example statemachine from my talk and slides
License MIT
Informations about the package statemachine-example
Statemachine-Example
Implementation of the metabor/statemachine
What's inside?
The example from my talk is in the namespace Example and the slides (in german) in the docs directory. In the namespace MetaborStd are abstract types defined. These are exemplified implemented in the namespace Metabor.
1) Installing
Use Composer (recommended)
If you don't have Composer yet, download it following the instructions on http://getcomposer.org/ or just run the following command:
Then, use the create-project
command to generate the statemachine-example project:
Composer will install it and all its dependencies under the
path/to/install
directory.
Download an Archive File
You can also download an archive and unpack it somewhere under your web server root directory.
You also need to install all the necessary dependencies. Download composer (see above) and run the following command:
2) Run the example project
As a starting point I recommend the index.php
You can run it either from the command line:
Or by using a webserver. If you run PHP 5.4 or higher you can use the builtin webserver:
You can now access it in the webbrowser with http://localhost:8000/index.php.
To display the process a a graph, you'll have to
install GraphViz (dot
executable). Users of Debian/Ubuntu-based distributions may simply
invoke sudo apt-get install graphviz
, Windows users have to
download GraphViZ for Windows and remaining
users should install from GraphViz homepage.
You can now access the two processes with the get parameter "process": http://localhost:8000/graph.php?process=prepayment http://localhost:8000/graph.php?process=postpayment in the webbrowser.
Have fun and play with the example by changing it ;)
All Metabor libraries are released under the MIT license.
Enjoy!
All versions of statemachine-example with dependencies
metabor/statemachine Version *
clue/graph Version *
graphp/graphviz Version *