{"action":"created","comment":{"url":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls/comments/54917594","id":54917594,"diff_hunk":"@@ -0,0 +1,70 @@\n+# Knp Rad Domain Event\n+A lightweight domain event implementation for Doctrine2.\n+\n+## Installation\n+\n+With composer :\n+```bash\n+$ composer require knplabs/rad-domain-event\n+```\n+\n+If you are using symfony2 you can update your `app/AppKernel.php` file:\n+\n+```php\n+public function registerBundles()\n+{\n+    $bundles = array(\n+        // bundles here ...\n+        new Knp\\Rad\\DomainEvent\\Bundle\\DomainEventBundle();\n+    );\n+}\n+```\n+\n+## Usage\n+\n+### Setup your entity\n+\n+First, make sure your entity implements the [Provider](./src/Knp/Rad/DomainEvent/Provider.php) interface and uses the [ProviderTrait](./src/Knp/Rad/DomainEvent/ProviderTrait.php).\n+```php\n+use Knp\\Rad\\DomainEvent;\n+\n+class MyEntity implements DomainEvent\\Provider\n+{\n+\n+    use DomainEvent\\ProviderTrait;\n+}\n+```\n+\n+### Raise event \n+Trigger any event from your entity, through the `raise` method.\n+It will be turned into a [Knp\\Rad\\DomainEvent\\Event](./src/Knp/Rad/DomainEvent/Event.php) object and dispatched once your entity has been flushed. \n+```php\n+use Knp\\Rad\\DomainEvent;\n+\n+class MyEntity implements DomainEvent\\Provider\n+{\n+    // ...\n+    public function myFunction($arg) {\n+        // your function behavior\n+        $this->raise('myEventName', ['anyProperty' => $anyValue]);","path":"README.md","position":49,"original_position":49,"commit_id":"e256841212e6653ce314689135b825e4c97fc5f8","original_commit_id":"e256841212e6653ce314689135b825e4c97fc5f8","user":{"login":"Einenlum","id":5675200,"avatar_url":"https://avatars.githubusercontent.com/u/5675200?v=3","gravatar_id":"","url":"https://api.github.com/users/Einenlum","html_url":"https://github.com/Einenlum","followers_url":"https://api.github.com/users/Einenlum/followers","following_url":"https://api.github.com/users/Einenlum/following{/other_user}","gists_url":"https://api.github.com/users/Einenlum/gists{/gist_id}","starred_url":"https://api.github.com/users/Einenlum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Einenlum/subscriptions","organizations_url":"https://api.github.com/users/Einenlum/orgs","repos_url":"https://api.github.com/users/Einenlum/repos","events_url":"https://api.github.com/users/Einenlum/events{/privacy}","received_events_url":"https://api.github.com/users/Einenlum/received_events","type":"User","site_admin":false},"body":"Not fan of \"Property\". I think it's confusing here.","created_at":"2016-03-03T17:45:09Z","updated_at":"2016-03-03T17:45:09Z","html_url":"https://github.com/KnpLabs/rad-domain-event/pull/2#discussion_r54917594","pull_request_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls/comments/54917594"},"html":{"href":"https://github.com/KnpLabs/rad-domain-event/pull/2#discussion_r54917594"},"pull_request":{"href":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls/2","id":61587079,"html_url":"https://github.com/KnpLabs/rad-domain-event/pull/2","diff_url":"https://github.com/KnpLabs/rad-domain-event/pull/2.diff","patch_url":"https://github.com/KnpLabs/rad-domain-event/pull/2.patch","issue_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/issues/2","number":2,"state":"open","locked":false,"title":"Added tests, & documentation","user":{"login":"Shivoham","id":1434539,"avatar_url":"https://avatars.githubusercontent.com/u/1434539?v=3","gravatar_id":"","url":"https://api.github.com/users/Shivoham","html_url":"https://github.com/Shivoham","followers_url":"https://api.github.com/users/Shivoham/followers","following_url":"https://api.github.com/users/Shivoham/following{/other_user}","gists_url":"https://api.github.com/users/Shivoham/gists{/gist_id}","starred_url":"https://api.github.com/users/Shivoham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shivoham/subscriptions","organizations_url":"https://api.github.com/users/Shivoham/orgs","repos_url":"https://api.github.com/users/Shivoham/repos","events_url":"https://api.github.com/users/Shivoham/events{/privacy}","received_events_url":"https://api.github.com/users/Shivoham/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-03T16:38:16Z","updated_at":"2016-03-03T17:45:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47874f7fe6f20ddc2917d64dabb11c97feb58c7d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls/2/commits","review_comments_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls/2/comments","review_comment_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/issues/2/comments","statuses_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/statuses/e256841212e6653ce314689135b825e4c97fc5f8","head":{"label":"KnpLabs:feature/tests","ref":"feature/tests","sha":"e256841212e6653ce314689135b825e4c97fc5f8","user":{"login":"KnpLabs","id":202732,"avatar_url":"https://avatars.githubusercontent.com/u/202732?v=3","gravatar_id":"","url":"https://api.github.com/users/KnpLabs","html_url":"https://github.com/KnpLabs","followers_url":"https://api.github.com/users/KnpLabs/followers","following_url":"https://api.github.com/users/KnpLabs/following{/other_user}","gists_url":"https://api.github.com/users/KnpLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/KnpLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnpLabs/subscriptions","organizations_url":"https://api.github.com/users/KnpLabs/orgs","repos_url":"https://api.github.com/users/KnpLabs/repos","events_url":"https://api.github.com/users/KnpLabs/events{/privacy}","received_events_url":"https://api.github.com/users/KnpLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":37976068,"name":"rad-domain-event","full_name":"KnpLabs/rad-domain-event","owner":{"login":"KnpLabs","id":202732,"avatar_url":"https://avatars.githubusercontent.com/u/202732?v=3","gravatar_id":"","url":"https://api.github.com/users/KnpLabs","html_url":"https://github.com/KnpLabs","followers_url":"https://api.github.com/users/KnpLabs/followers","following_url":"https://api.github.com/users/KnpLabs/following{/other_user}","gists_url":"https://api.github.com/users/KnpLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/KnpLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnpLabs/subscriptions","organizations_url":"https://api.github.com/users/KnpLabs/orgs","repos_url":"https://api.github.com/users/KnpLabs/repos","events_url":"https://api.github.com/users/KnpLabs/events{/privacy}","received_events_url":"https://api.github.com/users/KnpLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/KnpLabs/rad-domain-event","description":"","fork":false,"url":"https://api.github.com/repos/KnpLabs/rad-domain-event","forks_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/forks","keys_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/teams","hooks_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/hooks","issue_events_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/issues/events{/number}","events_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/events","assignees_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/assignees{/user}","branches_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/branches{/branch}","tags_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/tags","blobs_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/git/refs{/sha}","trees_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/statuses/{sha}","languages_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/languages","stargazers_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/stargazers","contributors_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/contributors","subscribers_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/subscribers","subscription_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/subscription","commits_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/commits{/sha}","git_commits_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/git/commits{/sha}","comments_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/comments{/number}","issue_comment_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/issues/comments{/number}","contents_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/contents/{+path}","compare_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/merges","archive_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/downloads","issues_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/issues{/number}","pulls_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls{/number}","milestones_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/milestones{/number}","notifications_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/labels{/name}","releases_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/releases{/id}","deployments_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/deployments","created_at":"2015-06-24T09:43:35Z","updated_at":"2015-06-25T09:49:22Z","pushed_at":"2016-03-03T16:42:06Z","git_url":"git://github.com/KnpLabs/rad-domain-event.git","ssh_url":"git@github.com:KnpLabs/rad-domain-event.git","clone_url":"https://github.com/KnpLabs/rad-domain-event.git","svn_url":"https://github.com/KnpLabs/rad-domain-event","homepage":null,"size":7,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"KnpLabs:master","ref":"master","sha":"f38fe117189c0c950c91c4d187274de19dac3582","user":{"login":"KnpLabs","id":202732,"avatar_url":"https://avatars.githubusercontent.com/u/202732?v=3","gravatar_id":"","url":"https://api.github.com/users/KnpLabs","html_url":"https://github.com/KnpLabs","followers_url":"https://api.github.com/users/KnpLabs/followers","following_url":"https://api.github.com/users/KnpLabs/following{/other_user}","gists_url":"https://api.github.com/users/KnpLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/KnpLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnpLabs/subscriptions","organizations_url":"https://api.github.com/users/KnpLabs/orgs","repos_url":"https://api.github.com/users/KnpLabs/repos","events_url":"https://api.github.com/users/KnpLabs/events{/privacy}","received_events_url":"https://api.github.com/users/KnpLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":37976068,"name":"rad-domain-event","full_name":"KnpLabs/rad-domain-event","owner":{"login":"KnpLabs","id":202732,"avatar_url":"https://avatars.githubusercontent.com/u/202732?v=3","gravatar_id":"","url":"https://api.github.com/users/KnpLabs","html_url":"https://github.com/KnpLabs","followers_url":"https://api.github.com/users/KnpLabs/followers","following_url":"https://api.github.com/users/KnpLabs/following{/other_user}","gists_url":"https://api.github.com/users/KnpLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/KnpLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnpLabs/subscriptions","organizations_url":"https://api.github.com/users/KnpLabs/orgs","repos_url":"https://api.github.com/users/KnpLabs/repos","events_url":"https://api.github.com/users/KnpLabs/events{/privacy}","received_events_url":"https://api.github.com/users/KnpLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/KnpLabs/rad-domain-event","description":"","fork":false,"url":"https://api.github.com/repos/KnpLabs/rad-domain-event","forks_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/forks","keys_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/teams","hooks_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/hooks","issue_events_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/issues/events{/number}","events_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/events","assignees_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/assignees{/user}","branches_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/branches{/branch}","tags_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/tags","blobs_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/git/refs{/sha}","trees_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/statuses/{sha}","languages_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/languages","stargazers_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/stargazers","contributors_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/contributors","subscribers_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/subscribers","subscription_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/subscription","commits_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/commits{/sha}","git_commits_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/git/commits{/sha}","comments_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/comments{/number}","issue_comment_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/issues/comments{/number}","contents_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/contents/{+path}","compare_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/merges","archive_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/downloads","issues_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/issues{/number}","pulls_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls{/number}","milestones_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/milestones{/number}","notifications_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/labels{/name}","releases_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/releases{/id}","deployments_url":"https://api.github.com/repos/KnpLabs/rad-domain-event/deployments","created_at":"2015-06-24T09:43:35Z","updated_at":"2015-06-25T09:49:22Z","pushed_at":"2016-03-03T16:42:06Z","git_url":"git://github.com/KnpLabs/rad-domain-event.git","ssh_url":"git@github.com:KnpLabs/rad-domain-event.git","clone_url":"https://github.com/KnpLabs/rad-domain-event.git","svn_url":"https://github.com/KnpLabs/rad-domain-event","homepage":null,"size":7,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls/2"},"html":{"href":"https://github.com/KnpLabs/rad-domain-event/pull/2"},"issue":{"href":"https://api.github.com/repos/KnpLabs/rad-domain-event/issues/2"},"comments":{"href":"https://api.github.com/repos/KnpLabs/rad-domain-event/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KnpLabs/rad-domain-event/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/KnpLabs/rad-domain-event/statuses/e256841212e6653ce314689135b825e4c97fc5f8"}}}}