{"id":19854707,"url":"https://github.com/phwoolcon/fsm","last_synced_at":"2026-03-03T07:44:23.620Z","repository":{"id":57041328,"uuid":"58914146","full_name":"phwoolcon/fsm","owner":"phwoolcon","description":"Phwoolcon state machine","archived":false,"fork":false,"pushed_at":"2019-10-11T07:04:38.000Z","size":21,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T20:35:48.663Z","etag":null,"topics":["finite-state-machine"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phwoolcon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-16T07:57:13.000Z","updated_at":"2023-04-21T02:45:32.000Z","dependencies_parsed_at":"2022-08-24T01:10:55.903Z","dependency_job_id":null,"html_url":"https://github.com/phwoolcon/fsm","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phwoolcon%2Ffsm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phwoolcon%2Ffsm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phwoolcon%2Ffsm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phwoolcon%2Ffsm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phwoolcon","download_url":"https://codeload.github.com/phwoolcon/fsm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251969247,"owners_count":21673182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["finite-state-machine"],"created_at":"2024-11-12T14:10:10.900Z","updated_at":"2026-03-03T07:44:23.575Z","avatar_url":"https://github.com/phwoolcon.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phwoolcon Finite State Machine\n[![Build Status](https://travis-ci.org/phwoolcon/fsm.svg?branch=master)](https://travis-ci.org/phwoolcon/fsm)\n[![Code Coverage](https://codecov.io/gh/phwoolcon/fsm/branch/master/graph/badge.svg)](https://codecov.io/gh/phwoolcon/fsm)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nSee the definition of [Finite-state machine](https://en.wikipedia.org/wiki/Finite-state_machine) on Wikipedia\n\n## Installation\nAdd this library to your project by composer:\n\n```\ncomposer require \"phwoolcon/fsm\"\n```\n\n## Usage\n\n```php\n\u003c?php\nuse Phwoolcon\\Fsm\\StateMachine;\n$fsm = StateMachine::create([\n    'foo' =\u003e [\n        'process' =\u003e 'bar',\n    ],\n    'bar' =\u003e [\n        'process2' =\u003e 'hello',\n        'process3' =\u003e 'world',\n    ],\n]);\necho $fsm-\u003egetCurrentState();   // prints foo\necho $fsm-\u003enext();              // prints bar\necho $fsm-\u003edo('process2');      // prints hello\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphwoolcon%2Ffsm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphwoolcon%2Ffsm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphwoolcon%2Ffsm/lists"}