{"action":"created","comment":{"url":"https://api.github.com/repos/Kdyby/Translation/pulls/comments/38813589","id":38813589,"diff_hunk":"@@ -0,0 +1,85 @@\n+<?php\n+\n+namespace Kdyby\\Translation\\Listener;\n+\n+use Doctrine\\ORM\\Event\\LoadClassMetadataEventArgs;\n+use Doctrine\\ORM\\Mapping\\Builder\\ClassMetadataBuilder;\n+use Doctrine\\ORM\\Mapping\\ClassMetadata;\n+use Kdyby\\Doctrine\\Events;\n+use Kdyby\\Events\\Subscriber;\n+use Nette\\Object;\n+use Tracy\\Debugger;\n+\n+class TranslationMetadataListener extends Object implements Subscriber\n+{\n+\n+    const FAKE_ENTITY_NAME = 'Translation';\n+\n+    /** @var string */\n+    protected $table = 'translations';\n+\n+    /** @var string */\n+    protected $key = 'key';\n+\n+    /** @var string */\n+    protected $locale = 'locale';\n+\n+    /** @var string */\n+    protected $message = 'message';\n+\n+    /** @var string */\n+    protected $updatedAt = 'updated_at';\n+\n+    /**\n+     * @param string $table\n+     */\n+    public function setTableName($table)\n+    {\n+        $this->table = $table;\n+    }\n+\n+    /**\n+     * @param string $key\n+     * @param string $locale\n+     * @param string $message\n+     * @param string $updatedAt\n+     */\n+    public function setColumns($key, $locale, $message, $updatedAt)\n+    {\n+        $this->key = $key;\n+        $this->locale = $locale;\n+        $this->message = $message;\n+        $this->updatedAt = $updatedAt;\n+    }\n+\n+    /**\n+     * Returns an array of events this subscriber wants to listen to.\n+     *\n+     * @return array\n+     */\n+    public function getSubscribedEvents()\n+    {\n+        return array(Events::loadClassMetadata => 'loadClassMetadata');\n+    }\n+\n+    public function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs)","path":"src/Kdyby/Translation/Listener/TranslationMetadataListener.php","position":65,"original_position":65,"commit_id":"396eccd81f70ed5f1c9034973e4c251729659234","original_commit_id":"396eccd81f70ed5f1c9034973e4c251729659234","user":{"login":"fprochazka","id":158625,"avatar_url":"https://avatars.githubusercontent.com/u/158625?v=3","gravatar_id":"","url":"https://api.github.com/users/fprochazka","html_url":"https://github.com/fprochazka","followers_url":"https://api.github.com/users/fprochazka/followers","following_url":"https://api.github.com/users/fprochazka/following{/other_user}","gists_url":"https://api.github.com/users/fprochazka/gists{/gist_id}","starred_url":"https://api.github.com/users/fprochazka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fprochazka/subscriptions","organizations_url":"https://api.github.com/users/fprochazka/orgs","repos_url":"https://api.github.com/users/fprochazka/repos","events_url":"https://api.github.com/users/fprochazka/events{/privacy}","received_events_url":"https://api.github.com/users/fprochazka/received_events","type":"User","site_admin":false},"body":"pěkně :+1: ","created_at":"2015-09-05T18:44:20Z","updated_at":"2015-09-05T18:44:20Z","html_url":"https://github.com/Kdyby/Translation/pull/86#discussion_r38813589","pull_request_url":"https://api.github.com/repos/Kdyby/Translation/pulls/86","_links":{"self":{"href":"https://api.github.com/repos/Kdyby/Translation/pulls/comments/38813589"},"html":{"href":"https://github.com/Kdyby/Translation/pull/86#discussion_r38813589"},"pull_request":{"href":"https://api.github.com/repos/Kdyby/Translation/pulls/86"}}},"pull_request":{"url":"https://api.github.com/repos/Kdyby/Translation/pulls/86","id":43698852,"html_url":"https://github.com/Kdyby/Translation/pull/86","diff_url":"https://github.com/Kdyby/Translation/pull/86.diff","patch_url":"https://github.com/Kdyby/Translation/pull/86.patch","issue_url":"https://api.github.com/repos/Kdyby/Translation/issues/86","number":86,"state":"open","locked":false,"title":"Added loaders and dumpers for nette database and Doctrine DBAL.","user":{"login":"racinmat","id":5525771,"avatar_url":"https://avatars.githubusercontent.com/u/5525771?v=3","gravatar_id":"","url":"https://api.github.com/users/racinmat","html_url":"https://github.com/racinmat","followers_url":"https://api.github.com/users/racinmat/followers","following_url":"https://api.github.com/users/racinmat/following{/other_user}","gists_url":"https://api.github.com/users/racinmat/gists{/gist_id}","starred_url":"https://api.github.com/users/racinmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/racinmat/subscriptions","organizations_url":"https://api.github.com/users/racinmat/orgs","repos_url":"https://api.github.com/users/racinmat/repos","events_url":"https://api.github.com/users/racinmat/events{/privacy}","received_events_url":"https://api.github.com/users/racinmat/received_events","type":"User","site_admin":false},"body":"Added intergration of translations stored in database using doctrine DBAL and nette database.","created_at":"2015-08-29T17:57:04Z","updated_at":"2015-09-05T18:44:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b6422553c7be24abdc6100bbc5f55977c8fc507","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Kdyby/Translation/pulls/86/commits","review_comments_url":"https://api.github.com/repos/Kdyby/Translation/pulls/86/comments","review_comment_url":"https://api.github.com/repos/Kdyby/Translation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Kdyby/Translation/issues/86/comments","statuses_url":"https://api.github.com/repos/Kdyby/Translation/statuses/396eccd81f70ed5f1c9034973e4c251729659234","head":{"label":"XcoreCMS:master","ref":"master","sha":"396eccd81f70ed5f1c9034973e4c251729659234","user":{"login":"XcoreCMS","id":9268429,"avatar_url":"https://avatars.githubusercontent.com/u/9268429?v=3","gravatar_id":"","url":"https://api.github.com/users/XcoreCMS","html_url":"https://github.com/XcoreCMS","followers_url":"https://api.github.com/users/XcoreCMS/followers","following_url":"https://api.github.com/users/XcoreCMS/following{/other_user}","gists_url":"https://api.github.com/users/XcoreCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/XcoreCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XcoreCMS/subscriptions","organizations_url":"https://api.github.com/users/XcoreCMS/orgs","repos_url":"https://api.github.com/users/XcoreCMS/repos","events_url":"https://api.github.com/users/XcoreCMS/events{/privacy}","received_events_url":"https://api.github.com/users/XcoreCMS/received_events","type":"Organization","site_admin":false},"repo":{"id":41297581,"name":"Translation","full_name":"XcoreCMS/Translation","owner":{"login":"XcoreCMS","id":9268429,"avatar_url":"https://avatars.githubusercontent.com/u/9268429?v=3","gravatar_id":"","url":"https://api.github.com/users/XcoreCMS","html_url":"https://github.com/XcoreCMS","followers_url":"https://api.github.com/users/XcoreCMS/followers","following_url":"https://api.github.com/users/XcoreCMS/following{/other_user}","gists_url":"https://api.github.com/users/XcoreCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/XcoreCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XcoreCMS/subscriptions","organizations_url":"https://api.github.com/users/XcoreCMS/orgs","repos_url":"https://api.github.com/users/XcoreCMS/repos","events_url":"https://api.github.com/users/XcoreCMS/events{/privacy}","received_events_url":"https://api.github.com/users/XcoreCMS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/XcoreCMS/Translation","description":"Integration of Symfony/Translation into Nette Framework","fork":true,"url":"https://api.github.com/repos/XcoreCMS/Translation","forks_url":"https://api.github.com/repos/XcoreCMS/Translation/forks","keys_url":"https://api.github.com/repos/XcoreCMS/Translation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/XcoreCMS/Translation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/XcoreCMS/Translation/teams","hooks_url":"https://api.github.com/repos/XcoreCMS/Translation/hooks","issue_events_url":"https://api.github.com/repos/XcoreCMS/Translation/issues/events{/number}","events_url":"https://api.github.com/repos/XcoreCMS/Translation/events","assignees_url":"https://api.github.com/repos/XcoreCMS/Translation/assignees{/user}","branches_url":"https://api.github.com/repos/XcoreCMS/Translation/branches{/branch}","tags_url":"https://api.github.com/repos/XcoreCMS/Translation/tags","blobs_url":"https://api.github.com/repos/XcoreCMS/Translation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/XcoreCMS/Translation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/XcoreCMS/Translation/git/refs{/sha}","trees_url":"https://api.github.com/repos/XcoreCMS/Translation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/XcoreCMS/Translation/statuses/{sha}","languages_url":"https://api.github.com/repos/XcoreCMS/Translation/languages","stargazers_url":"https://api.github.com/repos/XcoreCMS/Translation/stargazers","contributors_url":"https://api.github.com/repos/XcoreCMS/Translation/contributors","subscribers_url":"https://api.github.com/repos/XcoreCMS/Translation/subscribers","subscription_url":"https://api.github.com/repos/XcoreCMS/Translation/subscription","commits_url":"https://api.github.com/repos/XcoreCMS/Translation/commits{/sha}","git_commits_url":"https://api.github.com/repos/XcoreCMS/Translation/git/commits{/sha}","comments_url":"https://api.github.com/repos/XcoreCMS/Translation/comments{/number}","issue_comment_url":"https://api.github.com/repos/XcoreCMS/Translation/issues/comments{/number}","contents_url":"https://api.github.com/repos/XcoreCMS/Translation/contents/{+path}","compare_url":"https://api.github.com/repos/XcoreCMS/Translation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/XcoreCMS/Translation/merges","archive_url":"https://api.github.com/repos/XcoreCMS/Translation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/XcoreCMS/Translation/downloads","issues_url":"https://api.github.com/repos/XcoreCMS/Translation/issues{/number}","pulls_url":"https://api.github.com/repos/XcoreCMS/Translation/pulls{/number}","milestones_url":"https://api.github.com/repos/XcoreCMS/Translation/milestones{/number}","notifications_url":"https://api.github.com/repos/XcoreCMS/Translation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/XcoreCMS/Translation/labels{/name}","releases_url":"https://api.github.com/repos/XcoreCMS/Translation/releases{/id}","created_at":"2015-08-24T10:40:02Z","updated_at":"2015-08-24T10:40:02Z","pushed_at":"2015-08-30T19:14:45Z","git_url":"git://github.com/XcoreCMS/Translation.git","ssh_url":"git@github.com:XcoreCMS/Translation.git","clone_url":"https://github.com/XcoreCMS/Translation.git","svn_url":"https://github.com/XcoreCMS/Translation","homepage":"https://packagist.org/packages/kdyby/translation","size":514,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Kdyby:master","ref":"master","sha":"95ea30618cfc7b736ffc071b27ded0445e21dd40","user":{"login":"Kdyby","id":615853,"avatar_url":"https://avatars.githubusercontent.com/u/615853?v=3","gravatar_id":"","url":"https://api.github.com/users/Kdyby","html_url":"https://github.com/Kdyby","followers_url":"https://api.github.com/users/Kdyby/followers","following_url":"https://api.github.com/users/Kdyby/following{/other_user}","gists_url":"https://api.github.com/users/Kdyby/gists{/gist_id}","starred_url":"https://api.github.com/users/Kdyby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kdyby/subscriptions","organizations_url":"https://api.github.com/users/Kdyby/orgs","repos_url":"https://api.github.com/users/Kdyby/repos","events_url":"https://api.github.com/users/Kdyby/events{/privacy}","received_events_url":"https://api.github.com/users/Kdyby/received_events","type":"Organization","site_admin":false},"repo":{"id":8676253,"name":"Translation","full_name":"Kdyby/Translation","owner":{"login":"Kdyby","id":615853,"avatar_url":"https://avatars.githubusercontent.com/u/615853?v=3","gravatar_id":"","url":"https://api.github.com/users/Kdyby","html_url":"https://github.com/Kdyby","followers_url":"https://api.github.com/users/Kdyby/followers","following_url":"https://api.github.com/users/Kdyby/following{/other_user}","gists_url":"https://api.github.com/users/Kdyby/gists{/gist_id}","starred_url":"https://api.github.com/users/Kdyby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kdyby/subscriptions","organizations_url":"https://api.github.com/users/Kdyby/orgs","repos_url":"https://api.github.com/users/Kdyby/repos","events_url":"https://api.github.com/users/Kdyby/events{/privacy}","received_events_url":"https://api.github.com/users/Kdyby/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Kdyby/Translation","description":"Integration of Symfony/Translation into Nette Framework","fork":false,"url":"https://api.github.com/repos/Kdyby/Translation","forks_url":"https://api.github.com/repos/Kdyby/Translation/forks","keys_url":"https://api.github.com/repos/Kdyby/Translation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kdyby/Translation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kdyby/Translation/teams","hooks_url":"https://api.github.com/repos/Kdyby/Translation/hooks","issue_events_url":"https://api.github.com/repos/Kdyby/Translation/issues/events{/number}","events_url":"https://api.github.com/repos/Kdyby/Translation/events","assignees_url":"https://api.github.com/repos/Kdyby/Translation/assignees{/user}","branches_url":"https://api.github.com/repos/Kdyby/Translation/branches{/branch}","tags_url":"https://api.github.com/repos/Kdyby/Translation/tags","blobs_url":"https://api.github.com/repos/Kdyby/Translation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kdyby/Translation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kdyby/Translation/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kdyby/Translation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kdyby/Translation/statuses/{sha}","languages_url":"https://api.github.com/repos/Kdyby/Translation/languages","stargazers_url":"https://api.github.com/repos/Kdyby/Translation/stargazers","contributors_url":"https://api.github.com/repos/Kdyby/Translation/contributors","subscribers_url":"https://api.github.com/repos/Kdyby/Translation/subscribers","subscription_url":"https://api.github.com/repos/Kdyby/Translation/subscription","commits_url":"https://api.github.com/repos/Kdyby/Translation/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kdyby/Translation/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kdyby/Translation/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kdyby/Translation/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kdyby/Translation/contents/{+path}","compare_url":"https://api.github.com/repos/Kdyby/Translation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kdyby/Translation/merges","archive_url":"https://api.github.com/repos/Kdyby/Translation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kdyby/Translation/downloads","issues_url":"https://api.github.com/repos/Kdyby/Translation/issues{/number}","pulls_url":"https://api.github.com/repos/Kdyby/Translation/pulls{/number}","milestones_url":"https://api.github.com/repos/Kdyby/Translation/milestones{/number}","notifications_url":"https://api.github.com/repos/Kdyby/Translation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kdyby/Translation/labels{/name}","releases_url":"https://api.github.com/repos/Kdyby/Translation/releases{/id}","created_at":"2013-03-09T21:13:42Z","updated_at":"2015-09-05T18:36:40Z","pushed_at":"2015-08-31T14:56:37Z","git_url":"git://github.com/Kdyby/Translation.git","ssh_url":"git@github.com:Kdyby/Translation.git","clone_url":"https://github.com/Kdyby/Translation.git","svn_url":"https://github.com/Kdyby/Translation","homepage":"https://packagist.org/packages/kdyby/translation","size":2495,"stargazers_count":49,"watchers_count":49,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":28,"forks":26,"open_issues":28,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Kdyby/Translation/pulls/86"},"html":{"href":"https://github.com/Kdyby/Translation/pull/86"},"issue":{"href":"https://api.github.com/repos/Kdyby/Translation/issues/86"},"comments":{"href":"https://api.github.com/repos/Kdyby/Translation/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/Kdyby/Translation/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/Kdyby/Translation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Kdyby/Translation/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/Kdyby/Translation/statuses/396eccd81f70ed5f1c9034973e4c251729659234"}}}}