PHPackages                             carlescliment/state-machine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. carlescliment/state-machine

ActiveProject[Utility &amp; Helpers](/categories/utility)

carlescliment/state-machine
===========================

A simple finite state machine with minimal dependencies

0.0.4(12y ago)44.0kMITPHPPHP &gt;=5.3.2

Since Aug 2Pushed 12y ago1 watchersCompare

[ Source](https://github.com/carlescliment/state-machine)[ Packagist](https://packagist.org/packages/carlescliment/state-machine)[ RSS](/packages/carlescliment-state-machine/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (5)Used By (0)

State Machine
=============

[](#state-machine)

This is a simple, no-deps PHP state machine.

Installation
------------

[](#installation)

Update your `composer.json` file adding the following dependency and run `php composer.phar update carlescliment/state-machine`:

```
    "carlescliment/state-machine": "0.0.4"

```

Usage
-----

[](#usage)

Implementing a state machine is straight-forward. You need four components; a statable object, states, transitions and the state machine.

```
