PHPackages                             m1lt0n/in\_great\_state - 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. m1lt0n/in\_great\_state

ActiveLibrary

m1lt0n/in\_great\_state
=======================

An easy to use state machine

v1.0.0(8y ago)113MITPHP

Since Jul 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/m1lt0n/in_great_state)[ Packagist](https://packagist.org/packages/m1lt0n/in_great_state)[ RSS](/packages/m1lt0n-in-great-state/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

InGreatState
============

[](#ingreatstate)

An easy to use and flexible state machine.

InGreatState is a simple and very extensible state machine. It is not opinionated and it can be used in combination with ORMs, web frameworks or in standalone scripts.

### Εxample

[](#εxample)

Assume you have an issue tracker. Issues can be in one of several states (e.g. open, wontfix, resolved, reopened etc). When transitioning from one state to the other, we want to do several things (e.g. send an email to the owner of the issue etc). An easy way to organize such actions are by using a state machine. An example of the example above could be:

```
