{"action":"created","comment":{"url":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls/comments/25995167","id":25995167,"diff_hunk":"@@ -0,0 +1,31 @@\n+<?php\n+\n+/*\n+ * This file is part of the Symfony CMF package.\n+ *\n+ * (c) 2011-2015 Symfony CMF\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ */\n+\n+namespace Symfony\\Cmf\\Bundle\\SiteContextBundle\\SiteContext;\n+\n+use Symfony\\Component\\HttpFoundation\\Request;\n+use Symfony\\Cmf\\Bundle\\SiteContextBundle\\SiteContext\\SiteInterface;\n+\n+/**\n+ * Represents ","path":"SiteContext/HostSiteInterface.php","position":18,"original_position":18,"commit_id":"3519617d1df8ff285612ddbcbad52efe3676b1fb","original_commit_id":"3519617d1df8ff285612ddbcbad52efe3676b1fb","user":{"login":"dantleech","id":530801,"avatar_url":"https://avatars.githubusercontent.com/u/530801?v=3","gravatar_id":"","url":"https://api.github.com/users/dantleech","html_url":"https://github.com/dantleech","followers_url":"https://api.github.com/users/dantleech/followers","following_url":"https://api.github.com/users/dantleech/following{/other_user}","gists_url":"https://api.github.com/users/dantleech/gists{/gist_id}","starred_url":"https://api.github.com/users/dantleech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantleech/subscriptions","organizations_url":"https://api.github.com/users/dantleech/orgs","repos_url":"https://api.github.com/users/dantleech/repos","events_url":"https://api.github.com/users/dantleech/events{/privacy}","received_events_url":"https://api.github.com/users/dantleech/received_events","type":"User","site_admin":false},"body":"what?","created_at":"2015-03-07T10:49:43Z","updated_at":"2015-03-07T10:49:43Z","html_url":"https://github.com/dantleech/SiteContextBundle/pull/1#discussion_r25995167","pull_request_url":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls/comments/25995167"},"html":{"href":"https://github.com/dantleech/SiteContextBundle/pull/1#discussion_r25995167"},"pull_request":{"href":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls/1","id":28414867,"html_url":"https://github.com/dantleech/SiteContextBundle/pull/1","diff_url":"https://github.com/dantleech/SiteContextBundle/pull/1.diff","patch_url":"https://github.com/dantleech/SiteContextBundle/pull/1.patch","issue_url":"https://api.github.com/repos/dantleech/SiteContextBundle/issues/1","number":1,"state":"open","locked":false,"title":"Initial model for site context","user":{"login":"dantleech","id":530801,"avatar_url":"https://avatars.githubusercontent.com/u/530801?v=3","gravatar_id":"","url":"https://api.github.com/users/dantleech","html_url":"https://github.com/dantleech","followers_url":"https://api.github.com/users/dantleech/followers","following_url":"https://api.github.com/users/dantleech/following{/other_user}","gists_url":"https://api.github.com/users/dantleech/gists{/gist_id}","starred_url":"https://api.github.com/users/dantleech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantleech/subscriptions","organizations_url":"https://api.github.com/users/dantleech/orgs","repos_url":"https://api.github.com/users/dantleech/repos","events_url":"https://api.github.com/users/dantleech/events{/privacy}","received_events_url":"https://api.github.com/users/dantleech/received_events","type":"User","site_admin":false},"body":"This bundle aims to deliver multisite/portal capabilities to the Symfony CMF.\r\n\r\nSome concepts:\r\n\r\n- `Site` objects represent a website\r\n- There are persistent `Host` objects representing domain names (`www.example.dom`) and they reference `Site` objects\r\n- There are persistent `HostReference` objects which reference `Host` objects.\r\n- The `SiteContext` service holds the `Site` which has been determined for the current request.\r\n\r\nThe workflow is as follows:\r\n\r\n- Listener (e.g. listens on the CMF DynamicRouter pre match event) invokes a `HostResolver` which determines the correct `Host` from the persistence layer. \r\n- The hostname is determined from one of 3 resolvers - `HostResolver`, `QueryResolver` and `DefaultResolver`. The first uses the requests hostname, the second a query parameters (`?_site=foobar.com`) and the last a preconfigured default.\r\n- Once the host is resolved, its referenced `Site` is loaded into the `SiteContext`\r\n\r\nIssues:\r\n\r\n- Site determination is only supported via. the hostname. But a valid use case could be made for determining the site based on a URL prefix. e.g. `example.com/sites/mysite/foo` where all requests below `/sites/mysite` should have a particular site loaded.","created_at":"2015-01-31T13:28:32Z","updated_at":"2015-03-07T10:49:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e01bfc8988819d595cfb17c9dd3a1a36887e90cd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls/1/commits","review_comments_url":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls/1/comments","review_comment_url":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dantleech/SiteContextBundle/issues/1/comments","statuses_url":"https://api.github.com/repos/dantleech/SiteContextBundle/statuses/3519617d1df8ff285612ddbcbad52efe3676b1fb","head":{"label":"dantleech:develop","ref":"develop","sha":"3519617d1df8ff285612ddbcbad52efe3676b1fb","user":{"login":"dantleech","id":530801,"avatar_url":"https://avatars.githubusercontent.com/u/530801?v=3","gravatar_id":"","url":"https://api.github.com/users/dantleech","html_url":"https://github.com/dantleech","followers_url":"https://api.github.com/users/dantleech/followers","following_url":"https://api.github.com/users/dantleech/following{/other_user}","gists_url":"https://api.github.com/users/dantleech/gists{/gist_id}","starred_url":"https://api.github.com/users/dantleech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantleech/subscriptions","organizations_url":"https://api.github.com/users/dantleech/orgs","repos_url":"https://api.github.com/users/dantleech/repos","events_url":"https://api.github.com/users/dantleech/events{/privacy}","received_events_url":"https://api.github.com/users/dantleech/received_events","type":"User","site_admin":false},"repo":{"id":30112569,"name":"SiteContextBundle","full_name":"dantleech/SiteContextBundle","owner":{"login":"dantleech","id":530801,"avatar_url":"https://avatars.githubusercontent.com/u/530801?v=3","gravatar_id":"","url":"https://api.github.com/users/dantleech","html_url":"https://github.com/dantleech","followers_url":"https://api.github.com/users/dantleech/followers","following_url":"https://api.github.com/users/dantleech/following{/other_user}","gists_url":"https://api.github.com/users/dantleech/gists{/gist_id}","starred_url":"https://api.github.com/users/dantleech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantleech/subscriptions","organizations_url":"https://api.github.com/users/dantleech/orgs","repos_url":"https://api.github.com/users/dantleech/repos","events_url":"https://api.github.com/users/dantleech/events{/privacy}","received_events_url":"https://api.github.com/users/dantleech/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dantleech/SiteContextBundle","description":"Symfony CMF Bundle which provides Site objects based on hostname","fork":false,"url":"https://api.github.com/repos/dantleech/SiteContextBundle","forks_url":"https://api.github.com/repos/dantleech/SiteContextBundle/forks","keys_url":"https://api.github.com/repos/dantleech/SiteContextBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dantleech/SiteContextBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dantleech/SiteContextBundle/teams","hooks_url":"https://api.github.com/repos/dantleech/SiteContextBundle/hooks","issue_events_url":"https://api.github.com/repos/dantleech/SiteContextBundle/issues/events{/number}","events_url":"https://api.github.com/repos/dantleech/SiteContextBundle/events","assignees_url":"https://api.github.com/repos/dantleech/SiteContextBundle/assignees{/user}","branches_url":"https://api.github.com/repos/dantleech/SiteContextBundle/branches{/branch}","tags_url":"https://api.github.com/repos/dantleech/SiteContextBundle/tags","blobs_url":"https://api.github.com/repos/dantleech/SiteContextBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dantleech/SiteContextBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dantleech/SiteContextBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/dantleech/SiteContextBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dantleech/SiteContextBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/dantleech/SiteContextBundle/languages","stargazers_url":"https://api.github.com/repos/dantleech/SiteContextBundle/stargazers","contributors_url":"https://api.github.com/repos/dantleech/SiteContextBundle/contributors","subscribers_url":"https://api.github.com/repos/dantleech/SiteContextBundle/subscribers","subscription_url":"https://api.github.com/repos/dantleech/SiteContextBundle/subscription","commits_url":"https://api.github.com/repos/dantleech/SiteContextBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/dantleech/SiteContextBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/dantleech/SiteContextBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/dantleech/SiteContextBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/dantleech/SiteContextBundle/contents/{+path}","compare_url":"https://api.github.com/repos/dantleech/SiteContextBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dantleech/SiteContextBundle/merges","archive_url":"https://api.github.com/repos/dantleech/SiteContextBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dantleech/SiteContextBundle/downloads","issues_url":"https://api.github.com/repos/dantleech/SiteContextBundle/issues{/number}","pulls_url":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/dantleech/SiteContextBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/dantleech/SiteContextBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dantleech/SiteContextBundle/labels{/name}","releases_url":"https://api.github.com/repos/dantleech/SiteContextBundle/releases{/id}","created_at":"2015-01-31T13:12:41Z","updated_at":"2015-01-31T13:17:50Z","pushed_at":"2015-03-07T10:45:32Z","git_url":"git://github.com/dantleech/SiteContextBundle.git","ssh_url":"git@github.com:dantleech/SiteContextBundle.git","clone_url":"https://github.com/dantleech/SiteContextBundle.git","svn_url":"https://github.com/dantleech/SiteContextBundle","homepage":null,"size":200,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dantleech:master","ref":"master","sha":"7f2b69474b5c133e05866b0f67fa9203c9cbc90f","user":{"login":"dantleech","id":530801,"avatar_url":"https://avatars.githubusercontent.com/u/530801?v=3","gravatar_id":"","url":"https://api.github.com/users/dantleech","html_url":"https://github.com/dantleech","followers_url":"https://api.github.com/users/dantleech/followers","following_url":"https://api.github.com/users/dantleech/following{/other_user}","gists_url":"https://api.github.com/users/dantleech/gists{/gist_id}","starred_url":"https://api.github.com/users/dantleech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantleech/subscriptions","organizations_url":"https://api.github.com/users/dantleech/orgs","repos_url":"https://api.github.com/users/dantleech/repos","events_url":"https://api.github.com/users/dantleech/events{/privacy}","received_events_url":"https://api.github.com/users/dantleech/received_events","type":"User","site_admin":false},"repo":{"id":30112569,"name":"SiteContextBundle","full_name":"dantleech/SiteContextBundle","owner":{"login":"dantleech","id":530801,"avatar_url":"https://avatars.githubusercontent.com/u/530801?v=3","gravatar_id":"","url":"https://api.github.com/users/dantleech","html_url":"https://github.com/dantleech","followers_url":"https://api.github.com/users/dantleech/followers","following_url":"https://api.github.com/users/dantleech/following{/other_user}","gists_url":"https://api.github.com/users/dantleech/gists{/gist_id}","starred_url":"https://api.github.com/users/dantleech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantleech/subscriptions","organizations_url":"https://api.github.com/users/dantleech/orgs","repos_url":"https://api.github.com/users/dantleech/repos","events_url":"https://api.github.com/users/dantleech/events{/privacy}","received_events_url":"https://api.github.com/users/dantleech/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dantleech/SiteContextBundle","description":"Symfony CMF Bundle which provides Site objects based on hostname","fork":false,"url":"https://api.github.com/repos/dantleech/SiteContextBundle","forks_url":"https://api.github.com/repos/dantleech/SiteContextBundle/forks","keys_url":"https://api.github.com/repos/dantleech/SiteContextBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dantleech/SiteContextBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dantleech/SiteContextBundle/teams","hooks_url":"https://api.github.com/repos/dantleech/SiteContextBundle/hooks","issue_events_url":"https://api.github.com/repos/dantleech/SiteContextBundle/issues/events{/number}","events_url":"https://api.github.com/repos/dantleech/SiteContextBundle/events","assignees_url":"https://api.github.com/repos/dantleech/SiteContextBundle/assignees{/user}","branches_url":"https://api.github.com/repos/dantleech/SiteContextBundle/branches{/branch}","tags_url":"https://api.github.com/repos/dantleech/SiteContextBundle/tags","blobs_url":"https://api.github.com/repos/dantleech/SiteContextBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dantleech/SiteContextBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dantleech/SiteContextBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/dantleech/SiteContextBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dantleech/SiteContextBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/dantleech/SiteContextBundle/languages","stargazers_url":"https://api.github.com/repos/dantleech/SiteContextBundle/stargazers","contributors_url":"https://api.github.com/repos/dantleech/SiteContextBundle/contributors","subscribers_url":"https://api.github.com/repos/dantleech/SiteContextBundle/subscribers","subscription_url":"https://api.github.com/repos/dantleech/SiteContextBundle/subscription","commits_url":"https://api.github.com/repos/dantleech/SiteContextBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/dantleech/SiteContextBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/dantleech/SiteContextBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/dantleech/SiteContextBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/dantleech/SiteContextBundle/contents/{+path}","compare_url":"https://api.github.com/repos/dantleech/SiteContextBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dantleech/SiteContextBundle/merges","archive_url":"https://api.github.com/repos/dantleech/SiteContextBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dantleech/SiteContextBundle/downloads","issues_url":"https://api.github.com/repos/dantleech/SiteContextBundle/issues{/number}","pulls_url":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/dantleech/SiteContextBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/dantleech/SiteContextBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dantleech/SiteContextBundle/labels{/name}","releases_url":"https://api.github.com/repos/dantleech/SiteContextBundle/releases{/id}","created_at":"2015-01-31T13:12:41Z","updated_at":"2015-01-31T13:17:50Z","pushed_at":"2015-03-07T10:45:32Z","git_url":"git://github.com/dantleech/SiteContextBundle.git","ssh_url":"git@github.com:dantleech/SiteContextBundle.git","clone_url":"https://github.com/dantleech/SiteContextBundle.git","svn_url":"https://github.com/dantleech/SiteContextBundle","homepage":null,"size":200,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls/1"},"html":{"href":"https://github.com/dantleech/SiteContextBundle/pull/1"},"issue":{"href":"https://api.github.com/repos/dantleech/SiteContextBundle/issues/1"},"comments":{"href":"https://api.github.com/repos/dantleech/SiteContextBundle/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dantleech/SiteContextBundle/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/dantleech/SiteContextBundle/statuses/3519617d1df8ff285612ddbcbad52efe3676b1fb"}}}}