Skip to content

Commit 30d967b

Browse files
authored
Update README.md
1 parent 8c9840a commit 30d967b

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
2-
*Remark: It's a work-in-progress project! Wanna contribute? Let me know.*
3-
41
# State Machine Framework for PHP
52

63
Maybe state machines are not what you usually do with PHP but when you do... just use this.
4+
This simple yet powerful framework will keep your state machines within their desired state
5+
transition cycles. You can also modify their behavior whilst running or just configure them
6+
dynamically and launch. You can define state transition conditions you want based upon
7+
anonymous functions or class methods. Fire events on each state transition with your favorite
8+
event dispatcher.
79

810

911
## Usage example
1012

11-
### State dictionary
13+
### States' dictionary
1214

1315
```php
1416

17+
/**
18+
* @method static DRAFT()
19+
* @method static SENT()
20+
* ... // this should make your IDE believe those method exist
21+
*
22+
*/
1523
class PetitionEnum extends StateEnum {
1624
const __default = self::DRAFT,
1725
DRAFT = 'draft',
@@ -114,4 +122,4 @@ Maybe state machines are not what you usually do with PHP but when you do... jus
114122
// State changed from voted to accepted
115123

116124
```
117-
125+

0 commit comments

Comments
 (0)