PHPackages                             marijn/spil - 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. marijn/spil

ActiveLibrary

marijn/spil
===========

Finite state machine for creating locks

912PHP

Since Jun 27Pushed 13y ago1 watchersCompare

[ Source](https://github.com/marijn/Spil)[ Packagist](https://packagist.org/packages/marijn/spil)[ RSS](/packages/marijn-spil/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

> **This is a an experiment for the better part of it. However, if you feel this is somehow of use to you, please let me know. -- Marijn**

A basic finite state machine implementation for a lock. The implementation was inspired by a [comment from Gordon on stackoverflow](http://stackoverflow.com/questions/4274031/php-state-machine-framework#answer-4275232).

I might have gone overboard namespacing the hell out of it. You might want to check the previous revisions. Any thoughts on the code or functionality are welcome.

Usage
=====

[](#usage)

**A simple lock**

The idea is to create a lock and pass its state as an argument.

```
