Download the PHP package kphoen/doctrine-state-machine-bundle without Composer

On this page you can find all versions of the php package kphoen/doctrine-state-machine-bundle. 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 doctrine-state-machine-bundle

DoctrineStateMachineBundle

Doctrine2 behavior adding a finite state machine in your entities.

The state machine implementation used is Finite.

Status

This project is DEPRECATED and should NOT be used.

If someone magically appears and wants to maintain this project, I'll gladly give access to this repository.

Configuration

In your app/config/config.yml file, define your state machines:

The state machines configuration is pretty straightforward. In addition to the states and transitions, you just have to define the entity class and the column used to store the state.

Important: the entity has to implement the Stateful interface.

To ease the implementation, you can use the StatefulTrait that comes bundled with the behavior.

Usage

Stateful entities have access to their own state machine. See Finite's documentation for more details about it.

The Article entity below is ready to be used as a Stateful entity.

Entities using the StatefulTrait see the setStateMachine() and getStateMachine() methods implemented and gain access to the following methods:

Lifecyle callbacks

If you use the event-aware state-machine (which is the default one used by the bundle), the extension provides a listener implementing "lifecyle callbacks" for stateful entities.

For each available transition, three methods can be executed:

Using a service

You can put the state logic outside of the entity using a listener on Finite events. The extension provides an abstract EventSubcriber with the same methods as the "lifecyle callbacks" listener.

You need to declare a service and extend the AbstractSubcriber.

Twig

The bundle also exposes a few Twig helpers:

Installation

Install the behavior adding kphoen/doctrine-state-machine-bundle to your composer.json or from CLI:

Than register the bundle in your app/AppKernel.php file:

License

This bundle is released under the MIT license.


All versions of doctrine-state-machine-bundle with dependencies

PHP Build Version
Package Version
Requires symfony/framework-bundle Version ~2.3|~3.0
doctrine/doctrine-bundle Version ~1.2
kphoen/doctrine-state-machine Version ~1.0
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 kphoen/doctrine-state-machine-bundle contains the following files

Loading the files please wait ....