{"id":44539683,"url":"https://github.com/worksolutions/yii-event-dispatcher","last_synced_at":"2026-02-13T18:56:37.897Z","repository":{"id":57081886,"uuid":"20319666","full_name":"worksolutions/yii-event-dispatcher","owner":"worksolutions","description":"[deprecated]","archived":false,"fork":false,"pushed_at":"2014-06-05T08:10:07.000Z","size":264,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-03-27T07:15:29.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/worksolutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-05-30T06:38:24.000Z","updated_at":"2024-03-27T07:15:29.556Z","dependencies_parsed_at":"2022-08-24T14:58:18.030Z","dependency_job_id":null,"html_url":"https://github.com/worksolutions/yii-event-dispatcher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/worksolutions/yii-event-dispatcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worksolutions%2Fyii-event-dispatcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worksolutions%2Fyii-event-dispatcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worksolutions%2Fyii-event-dispatcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worksolutions%2Fyii-event-dispatcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/worksolutions","download_url":"https://codeload.github.com/worksolutions/yii-event-dispatcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/worksolutions%2Fyii-event-dispatcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29414292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"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-02-13T18:56:37.167Z","updated_at":"2026-02-13T18:56:37.888Z","avatar_url":"https://github.com/worksolutions.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"yii-ws-event-dispatcher\n=======================\n[![Travis CI](https://travis-ci.org/worksolutions/yii-ws-event-dispatcher.png \"Travis CI\")](https://travis-ci.org/worksolutions/yii-ws-event-dispatcher)\n[![Coverage Status](https://coveralls.io/repos/worksolutions/yii-ws-event-dispatcher/badge.png?branch=master)](https://coveralls.io/r/worksolutions/yii-ws-event-dispatcher?branch=master)\n\nEventDispatcher component a simple and effective make your projects truly extensible.\n\nInstallation\n------------\nAdd a dependency to your project's composer.json:\n```json\n{\n    \"require\": {\n        \"worksolutions/yii-ws-event-dispatcher\": \"dev-master\"\n    }\n}\n```\n\nUsage examples\n--------------\n#### Event call\n```php\n$dispatcher = Yii::app()-\u003eeventDispatcher;\n\n/** @var SomeEvent $event */\n$event = $dispatcher-\u003ecreateEvent(SomeEvent::className(), $eventTestParams);\n$dispatcher-\u003efire($event);\n```\n\n#### Config EventDispatcher component\n```php\n'components' =\u003e array(\n    'eventDispatcher' =\u003e array(\n        'class' =\u003e \\WS\\EventDispatcher\\EventDispatcher::className(),\n        'events' =\u003e array(\n            SomeEvent::className() =\u003e array(\n                array(\n                     'class' =\u003e SomeHandler::className(),\n                     'params' =\u003e array(),\n                ),\n                //...\n            ),\n            //...\n        ),\n    ),\n    //...\n)\n```\n\n#### Create handler class\n```php\nuse WS\\EventDispatcher\\Handler;\n\nclass SomeHandler extends Handler {\n    protected function identity() {\n        // check the availability of execution\n        return true;\n    }\n\n    protected function process() {\n        // you handler code\n    }\n}\n```\n\n#### Create event class\n```php\nuse WS\\EventDispatcher\\Event;\n\nclass SomeEvent extends Event {\n    public function attributeNames() {\n        return array(\n            'fieldName',\n            //...\n        );\n    }\n\n    public function rules() {\n        return array(\n            //validation rules\n        );\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworksolutions%2Fyii-event-dispatcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworksolutions%2Fyii-event-dispatcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworksolutions%2Fyii-event-dispatcher/lists"}