Skip to content

Finite Handler

matteosister edited this page Dec 4, 2014 · 3 revisions

Next (Events) ►

The Finite Handler handles state machine transitions on your objects.

PATCH /users/1

{ "op": "sm", "transition": "promote" }

The finite library is used to create a finite state machine on an object. I use it on many of my projects and it fits pretty well with the concept of patching an object, and expose some kind of "operation" to the consumers of your api.

Check the finite documentation to better understand what the finite library is able to do. Just remember to install it with composer or it won't work...

{
      "require": {
        "yohang/finite": "~1.1"
    }
}

Next (Events) ►