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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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

PHP Build Version
Package Version
Requires php Version >=5.3
metabor/statemachine Version *
clue/graph Version *
graphp/graphviz Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package metabor/statemachine-example contains the following files

Loading the files please wait ....