{"action":"created","comment":{"url":"https://api.github.com/repos/denkmal/denkmal.org/pulls/comments/64148269","id":64148269,"diff_hunk":"@@ -0,0 +1,55 @@\n+<?php\n+\n+abstract class Denkmal_Site_Region_Abstract extends Denkmal_Site_Default {\n+\n+    public function match(CM_Http_Request_Abstract $request, array $data) {\n+        if (!$this->hasRegion()) {\n+            return false;   // When the region has not been created (e.g. in tests)\n+        }\n+\n+        $match = parent::match($request, $data);\n+        if ($match) {\n+            $match = isset($data['region']) && $this->getRegion()->equals($data['region']);\n+        }\n+        return $match;\n+    }\n+\n+    /**\n+     * @return string\n+     */\n+    public function getUrl() {\n+        return parent::getUrl() . '/' . $this->getRegion()->getSlug();\n+    }\n+\n+    /**\n+     * @return string[]\n+     */\n+    public function getThemes() {\n+        $themes = parent::getThemes();\n+        $regionTheme = 'region-' . $this->getRegion()->getSlug();\n+        return array_merge([$regionTheme], $themes);\n+    }\n+\n+    /**\n+     * @return bool\n+     */\n+    public function hasRegion() {\n+        return null !== Denkmal_Model_Region::findBySlug($this->_getRegionSlug());\n+    }\n+\n+    /**\n+     * @return Denkmal_Model_Region\n+     * @throws CM_Exception\n+     */\n+    public function getRegion() {\n+        $slug = $this->_getRegionSlug();\n+        $region = Denkmal_Model_Region::findBySlug($slug);\n+        if (null === $region) {\n+            throw new CM_Exception('Cannot find region with slug `' . $slug . '`');\n+        }\n+        return $region;\n+    }\n+\n+    abstract protected function _getRegionSlug();","path":"library/Denkmal/library/Denkmal/Site/Region/Abstract.php","position":53,"original_position":53,"commit_id":"3ad1dcffd6dbd32d3896cd88718f173aa6256453","original_commit_id":"3ad1dcffd6dbd32d3896cd88718f173aa6256453","user":{"login":"fvovan","id":2360687,"avatar_url":"https://avatars.githubusercontent.com/u/2360687?v=3","gravatar_id":"","url":"https://api.github.com/users/fvovan","html_url":"https://github.com/fvovan","followers_url":"https://api.github.com/users/fvovan/followers","following_url":"https://api.github.com/users/fvovan/following{/other_user}","gists_url":"https://api.github.com/users/fvovan/gists{/gist_id}","starred_url":"https://api.github.com/users/fvovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fvovan/subscriptions","organizations_url":"https://api.github.com/users/fvovan/orgs","repos_url":"https://api.github.com/users/fvovan/repos","events_url":"https://api.github.com/users/fvovan/events{/privacy}","received_events_url":"https://api.github.com/users/fvovan/received_events","type":"User","site_admin":false},"body":"please add docu","created_at":"2016-05-22T11:19:01Z","updated_at":"2016-05-22T11:19:01Z","html_url":"https://github.com/denkmal/denkmal.org/pull/517#discussion_r64148269","pull_request_url":"https://api.github.com/repos/denkmal/denkmal.org/pulls/517","_links":{"self":{"href":"https://api.github.com/repos/denkmal/denkmal.org/pulls/comments/64148269"},"html":{"href":"https://github.com/denkmal/denkmal.org/pull/517#discussion_r64148269"},"pull_request":{"href":"https://api.github.com/repos/denkmal/denkmal.org/pulls/517"}}},"pull_request":{"url":"https://api.github.com/repos/denkmal/denkmal.org/pulls/517","id":70945871,"html_url":"https://github.com/denkmal/denkmal.org/pull/517","diff_url":"https://github.com/denkmal/denkmal.org/pull/517.diff","patch_url":"https://github.com/denkmal/denkmal.org/pull/517.patch","issue_url":"https://api.github.com/repos/denkmal/denkmal.org/issues/517","number":517,"state":"open","locked":false,"title":"Introduce regional site","user":{"login":"njam","id":360800,"avatar_url":"https://avatars.githubusercontent.com/u/360800?v=3","gravatar_id":"","url":"https://api.github.com/users/njam","html_url":"https://github.com/njam","followers_url":"https://api.github.com/users/njam/followers","following_url":"https://api.github.com/users/njam/following{/other_user}","gists_url":"https://api.github.com/users/njam/gists{/gist_id}","starred_url":"https://api.github.com/users/njam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njam/subscriptions","organizations_url":"https://api.github.com/users/njam/orgs","repos_url":"https://api.github.com/users/njam/repos","events_url":"https://api.github.com/users/njam/events{/privacy}","received_events_url":"https://api.github.com/users/njam/received_events","type":"User","site_admin":false},"body":"- Denkmal_Site_Abstract\r\n- Denkmal_Site_Default\r\n- Denkmal_Site_Region_Abstract\r\n- Denkmal_Site_Region_Basel\r\n- Denkmal_Site_Region_Graz\r\n- Admin_Site extends Denkmal_Site_Abstract","created_at":"2016-05-21T10:22:55Z","updated_at":"2016-05-22T11:19:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"049144b466ae2c9682cdbd20738eeca230e4cf78","assignee":{"login":"njam","id":360800,"avatar_url":"https://avatars.githubusercontent.com/u/360800?v=3","gravatar_id":"","url":"https://api.github.com/users/njam","html_url":"https://github.com/njam","followers_url":"https://api.github.com/users/njam/followers","following_url":"https://api.github.com/users/njam/following{/other_user}","gists_url":"https://api.github.com/users/njam/gists{/gist_id}","starred_url":"https://api.github.com/users/njam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njam/subscriptions","organizations_url":"https://api.github.com/users/njam/orgs","repos_url":"https://api.github.com/users/njam/repos","events_url":"https://api.github.com/users/njam/events{/privacy}","received_events_url":"https://api.github.com/users/njam/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/denkmal/denkmal.org/pulls/517/commits","review_comments_url":"https://api.github.com/repos/denkmal/denkmal.org/pulls/517/comments","review_comment_url":"https://api.github.com/repos/denkmal/denkmal.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/denkmal/denkmal.org/issues/517/comments","statuses_url":"https://api.github.com/repos/denkmal/denkmal.org/statuses/3ad1dcffd6dbd32d3896cd88718f173aa6256453","head":{"label":"njam:region-site","ref":"region-site","sha":"3ad1dcffd6dbd32d3896cd88718f173aa6256453","user":{"login":"njam","id":360800,"avatar_url":"https://avatars.githubusercontent.com/u/360800?v=3","gravatar_id":"","url":"https://api.github.com/users/njam","html_url":"https://github.com/njam","followers_url":"https://api.github.com/users/njam/followers","following_url":"https://api.github.com/users/njam/following{/other_user}","gists_url":"https://api.github.com/users/njam/gists{/gist_id}","starred_url":"https://api.github.com/users/njam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njam/subscriptions","organizations_url":"https://api.github.com/users/njam/orgs","repos_url":"https://api.github.com/users/njam/repos","events_url":"https://api.github.com/users/njam/events{/privacy}","received_events_url":"https://api.github.com/users/njam/received_events","type":"User","site_admin":false},"repo":{"id":12481912,"name":"denkmal.org","full_name":"njam/denkmal.org","owner":{"login":"njam","id":360800,"avatar_url":"https://avatars.githubusercontent.com/u/360800?v=3","gravatar_id":"","url":"https://api.github.com/users/njam","html_url":"https://github.com/njam","followers_url":"https://api.github.com/users/njam/followers","following_url":"https://api.github.com/users/njam/following{/other_user}","gists_url":"https://api.github.com/users/njam/gists{/gist_id}","starred_url":"https://api.github.com/users/njam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njam/subscriptions","organizations_url":"https://api.github.com/users/njam/orgs","repos_url":"https://api.github.com/users/njam/repos","events_url":"https://api.github.com/users/njam/events{/privacy}","received_events_url":"https://api.github.com/users/njam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/njam/denkmal.org","description":"http://www.denkmal.org/","fork":true,"url":"https://api.github.com/repos/njam/denkmal.org","forks_url":"https://api.github.com/repos/njam/denkmal.org/forks","keys_url":"https://api.github.com/repos/njam/denkmal.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/njam/denkmal.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/njam/denkmal.org/teams","hooks_url":"https://api.github.com/repos/njam/denkmal.org/hooks","issue_events_url":"https://api.github.com/repos/njam/denkmal.org/issues/events{/number}","events_url":"https://api.github.com/repos/njam/denkmal.org/events","assignees_url":"https://api.github.com/repos/njam/denkmal.org/assignees{/user}","branches_url":"https://api.github.com/repos/njam/denkmal.org/branches{/branch}","tags_url":"https://api.github.com/repos/njam/denkmal.org/tags","blobs_url":"https://api.github.com/repos/njam/denkmal.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/njam/denkmal.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/njam/denkmal.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/njam/denkmal.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/njam/denkmal.org/statuses/{sha}","languages_url":"https://api.github.com/repos/njam/denkmal.org/languages","stargazers_url":"https://api.github.com/repos/njam/denkmal.org/stargazers","contributors_url":"https://api.github.com/repos/njam/denkmal.org/contributors","subscribers_url":"https://api.github.com/repos/njam/denkmal.org/subscribers","subscription_url":"https://api.github.com/repos/njam/denkmal.org/subscription","commits_url":"https://api.github.com/repos/njam/denkmal.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/njam/denkmal.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/njam/denkmal.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/njam/denkmal.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/njam/denkmal.org/contents/{+path}","compare_url":"https://api.github.com/repos/njam/denkmal.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/njam/denkmal.org/merges","archive_url":"https://api.github.com/repos/njam/denkmal.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/njam/denkmal.org/downloads","issues_url":"https://api.github.com/repos/njam/denkmal.org/issues{/number}","pulls_url":"https://api.github.com/repos/njam/denkmal.org/pulls{/number}","milestones_url":"https://api.github.com/repos/njam/denkmal.org/milestones{/number}","notifications_url":"https://api.github.com/repos/njam/denkmal.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/njam/denkmal.org/labels{/name}","releases_url":"https://api.github.com/repos/njam/denkmal.org/releases{/id}","deployments_url":"https://api.github.com/repos/njam/denkmal.org/deployments","created_at":"2013-08-30T08:36:30Z","updated_at":"2015-05-03T13:24:40Z","pushed_at":"2016-05-22T11:14:09Z","git_url":"git://github.com/njam/denkmal.org.git","ssh_url":"git@github.com:njam/denkmal.org.git","clone_url":"https://github.com/njam/denkmal.org.git","svn_url":"https://github.com/njam/denkmal.org","homepage":null,"size":4288,"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":"denkmal:master","ref":"master","sha":"642e2999af9245f421d88f7591f2d852a77861b3","user":{"login":"denkmal","id":4641655,"avatar_url":"https://avatars.githubusercontent.com/u/4641655?v=3","gravatar_id":"","url":"https://api.github.com/users/denkmal","html_url":"https://github.com/denkmal","followers_url":"https://api.github.com/users/denkmal/followers","following_url":"https://api.github.com/users/denkmal/following{/other_user}","gists_url":"https://api.github.com/users/denkmal/gists{/gist_id}","starred_url":"https://api.github.com/users/denkmal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denkmal/subscriptions","organizations_url":"https://api.github.com/users/denkmal/orgs","repos_url":"https://api.github.com/users/denkmal/repos","events_url":"https://api.github.com/users/denkmal/events{/privacy}","received_events_url":"https://api.github.com/users/denkmal/received_events","type":"Organization","site_admin":false},"repo":{"id":10553711,"name":"denkmal.org","full_name":"denkmal/denkmal.org","owner":{"login":"denkmal","id":4641655,"avatar_url":"https://avatars.githubusercontent.com/u/4641655?v=3","gravatar_id":"","url":"https://api.github.com/users/denkmal","html_url":"https://github.com/denkmal","followers_url":"https://api.github.com/users/denkmal/followers","following_url":"https://api.github.com/users/denkmal/following{/other_user}","gists_url":"https://api.github.com/users/denkmal/gists{/gist_id}","starred_url":"https://api.github.com/users/denkmal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denkmal/subscriptions","organizations_url":"https://api.github.com/users/denkmal/orgs","repos_url":"https://api.github.com/users/denkmal/repos","events_url":"https://api.github.com/users/denkmal/events{/privacy}","received_events_url":"https://api.github.com/users/denkmal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/denkmal/denkmal.org","description":"http://www.denkmal.org/","fork":false,"url":"https://api.github.com/repos/denkmal/denkmal.org","forks_url":"https://api.github.com/repos/denkmal/denkmal.org/forks","keys_url":"https://api.github.com/repos/denkmal/denkmal.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/denkmal/denkmal.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/denkmal/denkmal.org/teams","hooks_url":"https://api.github.com/repos/denkmal/denkmal.org/hooks","issue_events_url":"https://api.github.com/repos/denkmal/denkmal.org/issues/events{/number}","events_url":"https://api.github.com/repos/denkmal/denkmal.org/events","assignees_url":"https://api.github.com/repos/denkmal/denkmal.org/assignees{/user}","branches_url":"https://api.github.com/repos/denkmal/denkmal.org/branches{/branch}","tags_url":"https://api.github.com/repos/denkmal/denkmal.org/tags","blobs_url":"https://api.github.com/repos/denkmal/denkmal.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/denkmal/denkmal.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/denkmal/denkmal.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/denkmal/denkmal.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/denkmal/denkmal.org/statuses/{sha}","languages_url":"https://api.github.com/repos/denkmal/denkmal.org/languages","stargazers_url":"https://api.github.com/repos/denkmal/denkmal.org/stargazers","contributors_url":"https://api.github.com/repos/denkmal/denkmal.org/contributors","subscribers_url":"https://api.github.com/repos/denkmal/denkmal.org/subscribers","subscription_url":"https://api.github.com/repos/denkmal/denkmal.org/subscription","commits_url":"https://api.github.com/repos/denkmal/denkmal.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/denkmal/denkmal.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/denkmal/denkmal.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/denkmal/denkmal.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/denkmal/denkmal.org/contents/{+path}","compare_url":"https://api.github.com/repos/denkmal/denkmal.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/denkmal/denkmal.org/merges","archive_url":"https://api.github.com/repos/denkmal/denkmal.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/denkmal/denkmal.org/downloads","issues_url":"https://api.github.com/repos/denkmal/denkmal.org/issues{/number}","pulls_url":"https://api.github.com/repos/denkmal/denkmal.org/pulls{/number}","milestones_url":"https://api.github.com/repos/denkmal/denkmal.org/milestones{/number}","notifications_url":"https://api.github.com/repos/denkmal/denkmal.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/denkmal/denkmal.org/labels{/name}","releases_url":"https://api.github.com/repos/denkmal/denkmal.org/releases{/id}","deployments_url":"https://api.github.com/repos/denkmal/denkmal.org/deployments","created_at":"2013-06-07T16:09:02Z","updated_at":"2016-04-14T11:25:33Z","pushed_at":"2016-05-22T11:14:10Z","git_url":"git://github.com/denkmal/denkmal.org.git","ssh_url":"git@github.com:denkmal/denkmal.org.git","clone_url":"https://github.com/denkmal/denkmal.org.git","svn_url":"https://github.com/denkmal/denkmal.org","homepage":null,"size":4323,"stargazers_count":8,"watchers_count":8,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":34,"forks":14,"open_issues":34,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/denkmal/denkmal.org/pulls/517"},"html":{"href":"https://github.com/denkmal/denkmal.org/pull/517"},"issue":{"href":"https://api.github.com/repos/denkmal/denkmal.org/issues/517"},"comments":{"href":"https://api.github.com/repos/denkmal/denkmal.org/issues/517/comments"},"review_comments":{"href":"https://api.github.com/repos/denkmal/denkmal.org/pulls/517/comments"},"review_comment":{"href":"https://api.github.com/repos/denkmal/denkmal.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/denkmal/denkmal.org/pulls/517/commits"},"statuses":{"href":"https://api.github.com/repos/denkmal/denkmal.org/statuses/3ad1dcffd6dbd32d3896cd88718f173aa6256453"}}}}
{"actor":{"display_login":"fvovan"}}