PHPackages                             piece/stagehand-fsm - 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. piece/stagehand-fsm

ActiveLibrary

piece/stagehand-fsm
===================

A finite state machine

v2.6.0(8y ago)3664.2k↓35.9%9[2 issues](https://github.com/phpmentors-jp/stagehand-fsm/issues)[2 PRs](https://github.com/phpmentors-jp/stagehand-fsm/pulls)3BSD-2-ClausePHPPHP &gt;=5.3.3

Since Aug 1Pushed 3y ago2 watchersCompare

[ Source](https://github.com/phpmentors-jp/stagehand-fsm)[ Packagist](https://packagist.org/packages/piece/stagehand-fsm)[ Docs](https://github.com/piece/stagehand-fsm/wiki)[ RSS](/packages/piece-stagehand-fsm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (9)Used By (3)

Stagehand\_FSM
==============

[](#stagehand_fsm)

A finite state machine

[![Total Downloads](https://camo.githubusercontent.com/6233f9c00d218621de15019af2759898bdf9d5f44ecc85da91e758e0d7983dfb/68747470733a2f2f706f7365722e707567782e6f72672f70696563652f737461676568616e642d66736d2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/piece/stagehand-fsm)[![Latest Stable Version](https://camo.githubusercontent.com/a9d14271540a78dbdde5e9f47427a87e54331836709ea5dfa8be8c1cc1ed778e/68747470733a2f2f706f7365722e707567782e6f72672f70696563652f737461676568616e642d66736d2f762f737461626c652e706e67)](https://packagist.org/packages/piece/stagehand-fsm)[![Latest Unstable Version](https://camo.githubusercontent.com/f1dc0ae3d1ecf39573f332b9d54795f4b130d12570feb270a8550836490edb59/68747470733a2f2f706f7365722e707567782e6f72672f7068706d656e746f72732f737461676568616e642d66736d2f762f756e737461626c652e706e67)](https://packagist.org/packages/phpmentors/stagehand-fsm)[![Build Status](https://camo.githubusercontent.com/b5fb3cea66463cf2003cdb494ce0d213be39dc04f25b2beec7da3296d53ac655/68747470733a2f2f7472617669732d63692e6f72672f7068706d656e746f72732d6a702f737461676568616e642d66736d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phpmentors-jp/stagehand-fsm)

`Stagehand_FSM` is a [finite state machine](https://en.wikipedia.org/wiki/Finite-state_machine).

Manual state management makes code complex, decreases intentionality. By using `Stagehand_FSM`, state management code can be declaratively represented in the form of FSM. This makes code simpler, increases intentionality.

`Stagehand_FSM` can be used as an infrastructure for [domain-specific languages](http://en.wikipedia.org/wiki/Domain-specific_language) (DSLs). Examples are workflow engines such as [Workflower](https://github.com/phpmentors-jp/workflower), pageflow engines such as [PHPMentorsPageflowerBundle](https://github.com/phpmentors-jp/pageflower-bundle).

```
