{"action":"created","comment":{"url":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/comments/25505806","id":25505806,"diff_hunk":"@@ -0,0 +1,89 @@\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\\SeoBundle\\Doctrine\\Phpcr;\n+\n+use Symfony\\Cmf\\Bundle\\SeoBundle\\AlternateLocaleProviderInterface;\n+use Symfony\\Cmf\\Bundle\\SeoBundle\\Model\\UrlInformation;\n+use Symfony\\Cmf\\Bundle\\SeoBundle\\SeoPresentation;\n+use Symfony\\Cmf\\Bundle\\SeoBundle\\Sitemap\\UrlInformationGuesserInterface;\n+use Symfony\\Component\\Routing\\RouterInterface;\n+\n+/**\n+ * A base guesser to extract url information from a document persisted with the phpcr-odm.\n+ *\n+ * @author Maximilian Berghoff <Maximilian.Berghoff@gmx.de>\n+ */\n+class SimpleUrlInformationGuesser implements UrlInformationGuesserInterface\n+{\n+    /**\n+     * @var AlternateLocaleProviderInterface\n+     */\n+    protected $alternateLocaleProvider;\n+\n+    /**\n+     * @var RouterInterface\n+     */\n+    private $router;\n+\n+    /**\n+     * @var string\n+     */\n+    private $defaultChangeFrequency;\n+\n+    /**\n+     * @var SeoPresentation\n+     */\n+    private $seoPresentation;\n+\n+    /**\n+     * @param RouterInterface $router\n+     * @param SeoPresentation $seoPresentation\n+     * @param $defaultChangeFrequency\n+     */\n+    public function __construct(\n+        RouterInterface $router,\n+        SeoPresentation $seoPresentation,\n+        $defaultChangeFrequency\n+    ) {\n+        $this->router = $router;\n+        $this->seoPresentation = $seoPresentation;\n+        $this->defaultChangeFrequency = $defaultChangeFrequency;\n+    }\n+\n+    /**\n+     * @param AlternateLocaleProviderInterface $alternateLocaleProvider\n+     */\n+    public function setAlternateLocaleProvider(AlternateLocaleProviderInterface $alternateLocaleProvider)\n+    {\n+        $this->alternateLocaleProvider = $alternateLocaleProvider;\n+    }\n+\n+    /**\n+     * {@inheritDocs}\n+     */\n+    public function guessValues(UrlInformation $urlInformation, $object, $sitemap = 'default')\n+    {\n+        $urlInformation->setLocation($this->router->generate($object, array(), true));","path":"Doctrine/Phpcr/SimpleUrlInformationGuesser.php","position":75,"original_position":75,"commit_id":"b80cd16e6eddb7a3a5797750ac01b887d12440ef","original_commit_id":"83e912bc4ca08c9a753d58a24ad85f6b849feb15","user":{"login":"ElectricMaxxx","id":2905834,"avatar_url":"https://avatars.githubusercontent.com/u/2905834?v=3","gravatar_id":"","url":"https://api.github.com/users/ElectricMaxxx","html_url":"https://github.com/ElectricMaxxx","followers_url":"https://api.github.com/users/ElectricMaxxx/followers","following_url":"https://api.github.com/users/ElectricMaxxx/following{/other_user}","gists_url":"https://api.github.com/users/ElectricMaxxx/gists{/gist_id}","starred_url":"https://api.github.com/users/ElectricMaxxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElectricMaxxx/subscriptions","organizations_url":"https://api.github.com/users/ElectricMaxxx/orgs","repos_url":"https://api.github.com/users/ElectricMaxxx/repos","events_url":"https://api.github.com/users/ElectricMaxxx/events{/privacy}","received_events_url":"https://api.github.com/users/ElectricMaxxx/received_events","type":"User","site_admin":false},"body":"That is a slightly different solution to the priority thing on the attributes, right?","created_at":"2015-02-27T13:30:35Z","updated_at":"2015-02-27T13:30:35Z","html_url":"https://github.com/symfony-cmf/SeoBundle/pull/225#discussion_r25505806","pull_request_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/225","_links":{"self":{"href":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/comments/25505806"},"html":{"href":"https://github.com/symfony-cmf/SeoBundle/pull/225#discussion_r25505806"},"pull_request":{"href":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/225"}}},"pull_request":{"url":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/225","id":29565452,"html_url":"https://github.com/symfony-cmf/SeoBundle/pull/225","diff_url":"https://github.com/symfony-cmf/SeoBundle/pull/225.diff","patch_url":"https://github.com/symfony-cmf/SeoBundle/pull/225.patch","issue_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/issues/225","number":225,"state":"open","locked":false,"title":"[WIP] create named sitemaps","user":{"login":"ElectricMaxxx","id":2905834,"avatar_url":"https://avatars.githubusercontent.com/u/2905834?v=3","gravatar_id":"","url":"https://api.github.com/users/ElectricMaxxx","html_url":"https://github.com/ElectricMaxxx","followers_url":"https://api.github.com/users/ElectricMaxxx/followers","following_url":"https://api.github.com/users/ElectricMaxxx/following{/other_user}","gists_url":"https://api.github.com/users/ElectricMaxxx/gists{/gist_id}","starred_url":"https://api.github.com/users/ElectricMaxxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElectricMaxxx/subscriptions","organizations_url":"https://api.github.com/users/ElectricMaxxx/orgs","repos_url":"https://api.github.com/users/ElectricMaxxx/repos","events_url":"https://api.github.com/users/ElectricMaxxx/events{/privacy}","received_events_url":"https://api.github.com/users/ElectricMaxxx/received_events","type":"User","site_admin":false},"body":"This PR will be a first step to solve #221 and #212. I started to introduce named sitemaps with its own defintions of default_change_frequency (later extracted by an guesser - just as fallback) and the templates.\r\n\r\nI thought i would make all steps in one PR, but seeing this one i would like to do more one for each task. \r\n\r\nFollowing tasks will be:\r\n* [x] named sitemaps with configuration and schema\r\n* [ ] create a voters wich reduce the list of documents, based on the result of the provider\r\n* [ ] let guesser do the work of creating url information baed on the given documents (after vote)\r\n* [ ] each of them will be taged services with an attribute `sitemap` to define different for each sitemap","created_at":"2015-02-18T21:35:23Z","updated_at":"2015-02-27T13:30:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d470aadd4dd8a285813ce6c754dfd7889633e12","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/225/commits","review_comments_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/225/comments","review_comment_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/issues/225/comments","statuses_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/statuses/b80cd16e6eddb7a3a5797750ac01b887d12440ef","head":{"label":"symfony-cmf:voters-guessers-and-different-sitemaps","ref":"voters-guessers-and-different-sitemaps","sha":"b80cd16e6eddb7a3a5797750ac01b887d12440ef","user":{"login":"symfony-cmf","id":342045,"avatar_url":"https://avatars.githubusercontent.com/u/342045?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony-cmf","html_url":"https://github.com/symfony-cmf","followers_url":"https://api.github.com/users/symfony-cmf/followers","following_url":"https://api.github.com/users/symfony-cmf/following{/other_user}","gists_url":"https://api.github.com/users/symfony-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony-cmf/subscriptions","organizations_url":"https://api.github.com/users/symfony-cmf/orgs","repos_url":"https://api.github.com/users/symfony-cmf/repos","events_url":"https://api.github.com/users/symfony-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/symfony-cmf/received_events","type":"Organization","site_admin":false},"repo":{"id":16372913,"name":"SeoBundle","full_name":"symfony-cmf/SeoBundle","owner":{"login":"symfony-cmf","id":342045,"avatar_url":"https://avatars.githubusercontent.com/u/342045?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony-cmf","html_url":"https://github.com/symfony-cmf","followers_url":"https://api.github.com/users/symfony-cmf/followers","following_url":"https://api.github.com/users/symfony-cmf/following{/other_user}","gists_url":"https://api.github.com/users/symfony-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony-cmf/subscriptions","organizations_url":"https://api.github.com/users/symfony-cmf/orgs","repos_url":"https://api.github.com/users/symfony-cmf/repos","events_url":"https://api.github.com/users/symfony-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/symfony-cmf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony-cmf/SeoBundle","description":"A SEO Solution for duplicate contents, page titles, etc.","fork":false,"url":"https://api.github.com/repos/symfony-cmf/SeoBundle","forks_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/forks","keys_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/teams","hooks_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/hooks","issue_events_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/issues/events{/number}","events_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/events","assignees_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/assignees{/user}","branches_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/branches{/branch}","tags_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/tags","blobs_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/languages","stargazers_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/stargazers","contributors_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/contributors","subscribers_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/subscribers","subscription_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/subscription","commits_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/contents/{+path}","compare_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/merges","archive_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/downloads","issues_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/issues{/number}","pulls_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/labels{/name}","releases_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/releases{/id}","created_at":"2014-01-30T09:17:14Z","updated_at":"2015-02-23T08:09:48Z","pushed_at":"2015-02-27T13:25:51Z","git_url":"git://github.com/symfony-cmf/SeoBundle.git","ssh_url":"git@github.com:symfony-cmf/SeoBundle.git","clone_url":"https://github.com/symfony-cmf/SeoBundle.git","svn_url":"https://github.com/symfony-cmf/SeoBundle","homepage":"","size":3182,"stargazers_count":10,"watchers_count":10,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":20,"forks":13,"open_issues":20,"watchers":10,"default_branch":"master"}},"base":{"label":"symfony-cmf:master","ref":"master","sha":"de5ff03c38d504ac1f33543a532a058ecabcadce","user":{"login":"symfony-cmf","id":342045,"avatar_url":"https://avatars.githubusercontent.com/u/342045?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony-cmf","html_url":"https://github.com/symfony-cmf","followers_url":"https://api.github.com/users/symfony-cmf/followers","following_url":"https://api.github.com/users/symfony-cmf/following{/other_user}","gists_url":"https://api.github.com/users/symfony-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony-cmf/subscriptions","organizations_url":"https://api.github.com/users/symfony-cmf/orgs","repos_url":"https://api.github.com/users/symfony-cmf/repos","events_url":"https://api.github.com/users/symfony-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/symfony-cmf/received_events","type":"Organization","site_admin":false},"repo":{"id":16372913,"name":"SeoBundle","full_name":"symfony-cmf/SeoBundle","owner":{"login":"symfony-cmf","id":342045,"avatar_url":"https://avatars.githubusercontent.com/u/342045?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony-cmf","html_url":"https://github.com/symfony-cmf","followers_url":"https://api.github.com/users/symfony-cmf/followers","following_url":"https://api.github.com/users/symfony-cmf/following{/other_user}","gists_url":"https://api.github.com/users/symfony-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony-cmf/subscriptions","organizations_url":"https://api.github.com/users/symfony-cmf/orgs","repos_url":"https://api.github.com/users/symfony-cmf/repos","events_url":"https://api.github.com/users/symfony-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/symfony-cmf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony-cmf/SeoBundle","description":"A SEO Solution for duplicate contents, page titles, etc.","fork":false,"url":"https://api.github.com/repos/symfony-cmf/SeoBundle","forks_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/forks","keys_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/teams","hooks_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/hooks","issue_events_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/issues/events{/number}","events_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/events","assignees_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/assignees{/user}","branches_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/branches{/branch}","tags_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/tags","blobs_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/languages","stargazers_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/stargazers","contributors_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/contributors","subscribers_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/subscribers","subscription_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/subscription","commits_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/contents/{+path}","compare_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/merges","archive_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/downloads","issues_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/issues{/number}","pulls_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/labels{/name}","releases_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/releases{/id}","created_at":"2014-01-30T09:17:14Z","updated_at":"2015-02-23T08:09:48Z","pushed_at":"2015-02-27T13:25:51Z","git_url":"git://github.com/symfony-cmf/SeoBundle.git","ssh_url":"git@github.com:symfony-cmf/SeoBundle.git","clone_url":"https://github.com/symfony-cmf/SeoBundle.git","svn_url":"https://github.com/symfony-cmf/SeoBundle","homepage":"","size":3182,"stargazers_count":10,"watchers_count":10,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":20,"forks":13,"open_issues":20,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/225"},"html":{"href":"https://github.com/symfony-cmf/SeoBundle/pull/225"},"issue":{"href":"https://api.github.com/repos/symfony-cmf/SeoBundle/issues/225"},"comments":{"href":"https://api.github.com/repos/symfony-cmf/SeoBundle/issues/225/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/225/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/225/commits"},"statuses":{"href":"https://api.github.com/repos/symfony-cmf/SeoBundle/statuses/b80cd16e6eddb7a3a5797750ac01b887d12440ef"}}}}