{"id":37005250,"url":"https://github.com/gianarb/fast-event-manager","last_synced_at":"2026-01-14T00:39:54.774Z","repository":{"id":62510624,"uuid":"45062778","full_name":"gianarb/fast-event-manager","owner":"gianarb","description":"PHP event manager based on regex. Easy to use and to extend","archived":true,"fork":false,"pushed_at":"2016-02-01T13:57:38.000Z","size":13,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T20:12:01.333Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gianarb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-27T18:52:02.000Z","updated_at":"2023-04-06T06:54:54.000Z","dependencies_parsed_at":"2022-11-02T10:30:59.049Z","dependency_job_id":null,"html_url":"https://github.com/gianarb/fast-event-manager","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gianarb/fast-event-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianarb%2Ffast-event-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianarb%2Ffast-event-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianarb%2Ffast-event-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianarb%2Ffast-event-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gianarb","download_url":"https://codeload.github.com/gianarb/fast-event-manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianarb%2Ffast-event-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-14T00:39:54.678Z","updated_at":"2026-01-14T00:39:54.751Z","avatar_url":"https://github.com/gianarb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastEventManager\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/gianarb/fast-event-manager/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/gianarb/fast-event-manager/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/gianarb/fast-event-manager/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/gianarb/fast-event-manager/?branch=master)\n[![Build Status](https://travis-ci.org/gianarb/fast-event-manager.svg)](https://travis-ci.org/gianarb/fast-event-manager)\n\nPHP event manager based on regex. Trigger events and attach listeners, core feature\neasy to understand and to extend.\n\n## Install\n\n```bash\n$ composer install gianarb/fast-event-manager\n```\n\n## Usage\n\n## Getting Started\nThis is the basic usage\n```php\n\u003c?php\nuse FastEventManager\\EventManager;\n\n$eventManager = new EventManager();\n\n$eventManager-\u003eattach(\"post-save\", function ($assertArg) {\n    // DO STUFF\n});\n\n$assert = false;\n$eventManager-\u003etrigger(\"/post-save/\", $assert);\n```\n\n## Priority\nFastEventManager support priority listeners\n```php\n$eventManager = new EventManager();\n\n$eventManager-\u003eattach(\"post-save\", function ($assertArg) {\n    echo \"Hi\";\n}, 100);\n\n$eventManager-\u003eattach(\"post-save\", function ($assertArg) {\n    echo \" dev!\";\n}, 10);\n\n$eventManager-\u003etrigger(\"/post-save/\");\n\n// output \"Hi dev!\"\n```\n\n## Regex\nFastEventManager resolve regex, you can trigger more events.\n```php\n$eventManager = new EventManager();\n\n$eventManager-\u003eattach(\"post-save\", function ($assertArg) {\n    echo \"Hi\";\n});\n\n$eventManager-\u003eattach(\"pload\", function ($assertArg) {\n    echo \" none!\";\n});\n\n$eventManager-\u003eattach(\"post-load\", function ($assertArg) {\n    echo \" dev!\";\n});\n\n$eventManager-\u003etrigger(\"/post-(save|load)/i\", $assert);\n\n// output \"Hi dev!\"\n```\n\n## Stop Propagation\nAt the moment we decided to don't support this feature into the core of FastEventManager because\nthere are a lot of implementation around this feature. This is an example\n\n```php\n$eventManager = new EventManager();\n$count = 0;\n$eventManager-\u003eattach(\"post\", function () use (\u0026$count) {\n    $count++;\n}, 100);\n$eventManager-\u003eattach(\"post\", function () use (\u0026$count) {\n    throw new \\Exception();\n}, 110);\n$eventManager-\u003eattach(\"post\", function () use (\u0026$count) {\n    $count++;\n}, 120);\ntry {\n    $eventManager-\u003etrigger(\"/post/\");\n} catch (\\Exception $exc) {\n    // STOP!\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgianarb%2Ffast-event-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgianarb%2Ffast-event-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgianarb%2Ffast-event-manager/lists"}