{"id":29461983,"url":"https://github.com/the-control-group/php-event-emitter","last_synced_at":"2025-10-10T01:41:33.240Z","repository":{"id":27258223,"uuid":"30730672","full_name":"the-control-group/php-event-emitter","owner":"the-control-group","description":"A simple class for emitting, fetching and consuming event messages. ","archived":false,"fork":false,"pushed_at":"2024-07-01T22:35:25.000Z","size":119,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":54,"default_branch":"main","last_synced_at":"2025-09-22T05:39:25.288Z","etag":null,"topics":["code","composer","tcg-pubrec-services"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the-control-group.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-12T23:22:30.000Z","updated_at":"2024-07-01T22:20:32.000Z","dependencies_parsed_at":"2024-06-24T23:27:40.812Z","dependency_job_id":"ff563395-e83a-42af-8a8a-a9556b13a608","html_url":"https://github.com/the-control-group/php-event-emitter","commit_stats":{"total_commits":15,"total_committers":3,"mean_commits":5.0,"dds":"0.33333333333333337","last_synced_commit":"f7f69e059641d9e5d3e26ab33d5e6ed816b10dc2"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/the-control-group/php-event-emitter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-control-group%2Fphp-event-emitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-control-group%2Fphp-event-emitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-control-group%2Fphp-event-emitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-control-group%2Fphp-event-emitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-control-group","download_url":"https://codeload.github.com/the-control-group/php-event-emitter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-control-group%2Fphp-event-emitter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002399,"owners_count":26083374,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["code","composer","tcg-pubrec-services"],"created_at":"2025-07-14T03:43:39.697Z","updated_at":"2025-10-10T01:41:33.236Z","avatar_url":"https://github.com/the-control-group.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PHP Event Emitter\n=================\n[![wercker status](https://app.wercker.com/status/bf7682ab160fc8e4a2acdb4b2721f582/s \"wercker status\")](https://app.wercker.com/project/bykey/bf7682ab160fc8e4a2acdb4b2721f582)\n\nA simple event emiter class with glob pattern matching.\n\n\nUsage\n-----\n\nUsing the base Emitter class:\n\n```php\n\u003c?php\n\n// create the emitter and set your glob deliminator\n$emitter = new \\TCG\\Event\\Emitter(':');\n\n// some callable\n$callable = function($event_slug, $foo=null, $bar=null){\n\n\t// do something here\n\n}\n\n// add a listener\n$emitter-\u003eon('order:*', $callable);\n\n// remove a listener\n$emitter-\u003eoff('order:*', $callable);\n\n// remove all listeners for a given pattern\n$emitter-\u003eoff('order:*');\n\n// emit an event\n$emitter-\u003eemit('order:success', 123456, 22.86);\n\n\n```\n\nUsing the provided [slim](http://www.slimframework.com) middleware:\n\n```php\n\u003c?php\n\n$app = new \\Slim\\Slim();\n\n$app-\u003eadd(new \\TCG\\Event\\Middleware());\n\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-control-group%2Fphp-event-emitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-control-group%2Fphp-event-emitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-control-group%2Fphp-event-emitter/lists"}