{"action":"created","comment":{"url":"https://api.github.com/repos/elcodi/elcodi/pulls/comments/28046911","id":28046911,"diff_hunk":"@@ -0,0 +1,102 @@\n+<?php\n+\n+/*\n+ * This file is part of the Elcodi package.\n+ *\n+ * Copyright (c) 2014-2015 Elcodi.com\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ *\n+ * Feel free to edit as you please, and have fun.\n+ *\n+ * @author Marc Morera <yuhu@mmoreram.com>\n+ * @author Aldo Chiecchia <zimage@tiscali.it>\n+ * @author Elcodi Team <tech@elcodi.com>\n+ */\n+\n+namespace Elcodi\\Component\\Sitemap\\Command;\n+\n+use Symfony\\Component\\Console\\Command\\Command;\n+use Symfony\\Component\\Console\\Input\\InputArgument;\n+use Symfony\\Component\\Console\\Input\\InputInterface;\n+use Symfony\\Component\\Console\\Input\\InputOption;\n+use Symfony\\Component\\Console\\Output\\OutputInterface;\n+use Symfony\\Component\\DependencyInjection\\ContainerInterface;\n+\n+use Elcodi\\Component\\Sitemap\\Builder\\SitemapBuilder;\n+use Elcodi\\Component\\Sitemap\\Exception\\SitemapBuilderNotFoundException;\n+\n+/**\n+ * Class SitemapBuildCommand\n+ */\n+class SitemapBuildCommand extends Command\n+{\n+    /**\n+     * @var ContainerInterface\n+     *\n+     * Container\n+     */\n+    protected $container;\n+\n+    /**\n+     * Construct\n+     *\n+     * @param ContainerInterface $container Container\n+     */\n+    public function __construct(ContainerInterface $container)\n+    {\n+        $this->container = $container;\n+\n+        parent::__construct();\n+    }\n+\n+    /**\n+     * configure\n+     */\n+    protected function configure()\n+    {\n+        $this\n+            ->setName('elcodi:sitemap:build')\n+            ->setDescription('Build a sitemap')\n+            ->addArgument(\n+                'builder-name',\n+                InputArgument::REQUIRED,\n+                'Builder name'\n+            )\n+            ->addOption(\n+                'language',\n+                null,\n+                InputOption::VALUE_OPTIONAL,\n+                'Language'\n+            );\n+    }\n+\n+    /**\n+     * Get the dumper name from the input object and tries to dump all sitemap\n+     * content\n+     *\n+     * @param InputInterface  $input  The input interface\n+     * @param OutputInterface $output The output interface\n+     *\n+     * @return integer|null|void\n+     *\n+     * @throws SitemapBuilderNotFoundException Profile not found\n+     */\n+    protected function execute(InputInterface $input, OutputInterface $output)\n+    {\n+        $builderName = $input->getArgument('builder-name');\n+        $language = $input->getOption('language');\n+        $sitemapBuilder = $this","path":"src/Elcodi/Component/Sitemap/Command/SitemapBuildCommand.php","position":90,"original_position":90,"commit_id":"7d469b88b028d2876c606720aa6af5381606853e","original_commit_id":"7d469b88b028d2876c606720aa6af5381606853e","user":{"login":"xphere","id":170968,"avatar_url":"https://avatars.githubusercontent.com/u/170968?v=3","gravatar_id":"","url":"https://api.github.com/users/xphere","html_url":"https://github.com/xphere","followers_url":"https://api.github.com/users/xphere/followers","following_url":"https://api.github.com/users/xphere/following{/other_user}","gists_url":"https://api.github.com/users/xphere/gists{/gist_id}","starred_url":"https://api.github.com/users/xphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xphere/subscriptions","organizations_url":"https://api.github.com/users/xphere/orgs","repos_url":"https://api.github.com/users/xphere/repos","events_url":"https://api.github.com/users/xphere/events{/privacy}","received_events_url":"https://api.github.com/users/xphere/received_events","type":"User","site_admin":false},"body":"This will throw a `ServiceNotFoundException` when the sitemap does not exist.","created_at":"2015-04-09T09:22:09Z","updated_at":"2015-04-09T09:22:09Z","html_url":"https://github.com/elcodi/elcodi/pull/712#discussion_r28046911","pull_request_url":"https://api.github.com/repos/elcodi/elcodi/pulls/712","_links":{"self":{"href":"https://api.github.com/repos/elcodi/elcodi/pulls/comments/28046911"},"html":{"href":"https://github.com/elcodi/elcodi/pull/712#discussion_r28046911"},"pull_request":{"href":"https://api.github.com/repos/elcodi/elcodi/pulls/712"}}},"pull_request":{"url":"https://api.github.com/repos/elcodi/elcodi/pulls/712","id":32917782,"html_url":"https://github.com/elcodi/elcodi/pull/712","diff_url":"https://github.com/elcodi/elcodi/pull/712.diff","patch_url":"https://github.com/elcodi/elcodi/pull/712.patch","issue_url":"https://api.github.com/repos/elcodi/elcodi/issues/712","number":712,"state":"open","locked":false,"title":"Feature/sitemap refactor","user":{"login":"mmoreram","id":521409,"avatar_url":"https://avatars.githubusercontent.com/u/521409?v=3","gravatar_id":"","url":"https://api.github.com/users/mmoreram","html_url":"https://github.com/mmoreram","followers_url":"https://api.github.com/users/mmoreram/followers","following_url":"https://api.github.com/users/mmoreram/following{/other_user}","gists_url":"https://api.github.com/users/mmoreram/gists{/gist_id}","starred_url":"https://api.github.com/users/mmoreram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmoreram/subscriptions","organizations_url":"https://api.github.com/users/mmoreram/orgs","repos_url":"https://api.github.com/users/mmoreram/repos","events_url":"https://api.github.com/users/mmoreram/events{/privacy}","received_events_url":"https://api.github.com/users/mmoreram/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-09T01:22:29Z","updated_at":"2015-04-09T09:22:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4fb1cf0ecadba7018931b9223e02ef539eb3166","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elcodi/elcodi/pulls/712/commits","review_comments_url":"https://api.github.com/repos/elcodi/elcodi/pulls/712/comments","review_comment_url":"https://api.github.com/repos/elcodi/elcodi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elcodi/elcodi/issues/712/comments","statuses_url":"https://api.github.com/repos/elcodi/elcodi/statuses/7d469b88b028d2876c606720aa6af5381606853e","head":{"label":"elcodi:feature/sitemap-refactor","ref":"feature/sitemap-refactor","sha":"7d469b88b028d2876c606720aa6af5381606853e","user":{"login":"elcodi","id":7143476,"avatar_url":"https://avatars.githubusercontent.com/u/7143476?v=3","gravatar_id":"","url":"https://api.github.com/users/elcodi","html_url":"https://github.com/elcodi","followers_url":"https://api.github.com/users/elcodi/followers","following_url":"https://api.github.com/users/elcodi/following{/other_user}","gists_url":"https://api.github.com/users/elcodi/gists{/gist_id}","starred_url":"https://api.github.com/users/elcodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcodi/subscriptions","organizations_url":"https://api.github.com/users/elcodi/orgs","repos_url":"https://api.github.com/users/elcodi/repos","events_url":"https://api.github.com/users/elcodi/events{/privacy}","received_events_url":"https://api.github.com/users/elcodi/received_events","type":"Organization","site_admin":false},"repo":{"id":18411790,"name":"elcodi","full_name":"elcodi/elcodi","owner":{"login":"elcodi","id":7143476,"avatar_url":"https://avatars.githubusercontent.com/u/7143476?v=3","gravatar_id":"","url":"https://api.github.com/users/elcodi","html_url":"https://github.com/elcodi","followers_url":"https://api.github.com/users/elcodi/followers","following_url":"https://api.github.com/users/elcodi/following{/other_user}","gists_url":"https://api.github.com/users/elcodi/gists{/gist_id}","starred_url":"https://api.github.com/users/elcodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcodi/subscriptions","organizations_url":"https://api.github.com/users/elcodi/orgs","repos_url":"https://api.github.com/users/elcodi/repos","events_url":"https://api.github.com/users/elcodi/events{/privacy}","received_events_url":"https://api.github.com/users/elcodi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elcodi/elcodi","description":"E-commerce components for Symfony","fork":false,"url":"https://api.github.com/repos/elcodi/elcodi","forks_url":"https://api.github.com/repos/elcodi/elcodi/forks","keys_url":"https://api.github.com/repos/elcodi/elcodi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elcodi/elcodi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elcodi/elcodi/teams","hooks_url":"https://api.github.com/repos/elcodi/elcodi/hooks","issue_events_url":"https://api.github.com/repos/elcodi/elcodi/issues/events{/number}","events_url":"https://api.github.com/repos/elcodi/elcodi/events","assignees_url":"https://api.github.com/repos/elcodi/elcodi/assignees{/user}","branches_url":"https://api.github.com/repos/elcodi/elcodi/branches{/branch}","tags_url":"https://api.github.com/repos/elcodi/elcodi/tags","blobs_url":"https://api.github.com/repos/elcodi/elcodi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elcodi/elcodi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elcodi/elcodi/git/refs{/sha}","trees_url":"https://api.github.com/repos/elcodi/elcodi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elcodi/elcodi/statuses/{sha}","languages_url":"https://api.github.com/repos/elcodi/elcodi/languages","stargazers_url":"https://api.github.com/repos/elcodi/elcodi/stargazers","contributors_url":"https://api.github.com/repos/elcodi/elcodi/contributors","subscribers_url":"https://api.github.com/repos/elcodi/elcodi/subscribers","subscription_url":"https://api.github.com/repos/elcodi/elcodi/subscription","commits_url":"https://api.github.com/repos/elcodi/elcodi/commits{/sha}","git_commits_url":"https://api.github.com/repos/elcodi/elcodi/git/commits{/sha}","comments_url":"https://api.github.com/repos/elcodi/elcodi/comments{/number}","issue_comment_url":"https://api.github.com/repos/elcodi/elcodi/issues/comments{/number}","contents_url":"https://api.github.com/repos/elcodi/elcodi/contents/{+path}","compare_url":"https://api.github.com/repos/elcodi/elcodi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elcodi/elcodi/merges","archive_url":"https://api.github.com/repos/elcodi/elcodi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elcodi/elcodi/downloads","issues_url":"https://api.github.com/repos/elcodi/elcodi/issues{/number}","pulls_url":"https://api.github.com/repos/elcodi/elcodi/pulls{/number}","milestones_url":"https://api.github.com/repos/elcodi/elcodi/milestones{/number}","notifications_url":"https://api.github.com/repos/elcodi/elcodi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elcodi/elcodi/labels{/name}","releases_url":"https://api.github.com/repos/elcodi/elcodi/releases{/id}","created_at":"2014-04-03T17:26:10Z","updated_at":"2015-04-08T13:39:44Z","pushed_at":"2015-04-09T08:54:04Z","git_url":"git://github.com/elcodi/elcodi.git","ssh_url":"git@github.com:elcodi/elcodi.git","clone_url":"https://github.com/elcodi/elcodi.git","svn_url":"https://github.com/elcodi/elcodi","homepage":"http://elcodi.io","size":15305,"stargazers_count":272,"watchers_count":272,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":52,"forks":62,"open_issues":52,"watchers":272,"default_branch":"master"}},"base":{"label":"elcodi:master","ref":"master","sha":"56a1a7126e2d6fa11b5f07fa1df8ac0396a1492a","user":{"login":"elcodi","id":7143476,"avatar_url":"https://avatars.githubusercontent.com/u/7143476?v=3","gravatar_id":"","url":"https://api.github.com/users/elcodi","html_url":"https://github.com/elcodi","followers_url":"https://api.github.com/users/elcodi/followers","following_url":"https://api.github.com/users/elcodi/following{/other_user}","gists_url":"https://api.github.com/users/elcodi/gists{/gist_id}","starred_url":"https://api.github.com/users/elcodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcodi/subscriptions","organizations_url":"https://api.github.com/users/elcodi/orgs","repos_url":"https://api.github.com/users/elcodi/repos","events_url":"https://api.github.com/users/elcodi/events{/privacy}","received_events_url":"https://api.github.com/users/elcodi/received_events","type":"Organization","site_admin":false},"repo":{"id":18411790,"name":"elcodi","full_name":"elcodi/elcodi","owner":{"login":"elcodi","id":7143476,"avatar_url":"https://avatars.githubusercontent.com/u/7143476?v=3","gravatar_id":"","url":"https://api.github.com/users/elcodi","html_url":"https://github.com/elcodi","followers_url":"https://api.github.com/users/elcodi/followers","following_url":"https://api.github.com/users/elcodi/following{/other_user}","gists_url":"https://api.github.com/users/elcodi/gists{/gist_id}","starred_url":"https://api.github.com/users/elcodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcodi/subscriptions","organizations_url":"https://api.github.com/users/elcodi/orgs","repos_url":"https://api.github.com/users/elcodi/repos","events_url":"https://api.github.com/users/elcodi/events{/privacy}","received_events_url":"https://api.github.com/users/elcodi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elcodi/elcodi","description":"E-commerce components for Symfony","fork":false,"url":"https://api.github.com/repos/elcodi/elcodi","forks_url":"https://api.github.com/repos/elcodi/elcodi/forks","keys_url":"https://api.github.com/repos/elcodi/elcodi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elcodi/elcodi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elcodi/elcodi/teams","hooks_url":"https://api.github.com/repos/elcodi/elcodi/hooks","issue_events_url":"https://api.github.com/repos/elcodi/elcodi/issues/events{/number}","events_url":"https://api.github.com/repos/elcodi/elcodi/events","assignees_url":"https://api.github.com/repos/elcodi/elcodi/assignees{/user}","branches_url":"https://api.github.com/repos/elcodi/elcodi/branches{/branch}","tags_url":"https://api.github.com/repos/elcodi/elcodi/tags","blobs_url":"https://api.github.com/repos/elcodi/elcodi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elcodi/elcodi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elcodi/elcodi/git/refs{/sha}","trees_url":"https://api.github.com/repos/elcodi/elcodi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elcodi/elcodi/statuses/{sha}","languages_url":"https://api.github.com/repos/elcodi/elcodi/languages","stargazers_url":"https://api.github.com/repos/elcodi/elcodi/stargazers","contributors_url":"https://api.github.com/repos/elcodi/elcodi/contributors","subscribers_url":"https://api.github.com/repos/elcodi/elcodi/subscribers","subscription_url":"https://api.github.com/repos/elcodi/elcodi/subscription","commits_url":"https://api.github.com/repos/elcodi/elcodi/commits{/sha}","git_commits_url":"https://api.github.com/repos/elcodi/elcodi/git/commits{/sha}","comments_url":"https://api.github.com/repos/elcodi/elcodi/comments{/number}","issue_comment_url":"https://api.github.com/repos/elcodi/elcodi/issues/comments{/number}","contents_url":"https://api.github.com/repos/elcodi/elcodi/contents/{+path}","compare_url":"https://api.github.com/repos/elcodi/elcodi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elcodi/elcodi/merges","archive_url":"https://api.github.com/repos/elcodi/elcodi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elcodi/elcodi/downloads","issues_url":"https://api.github.com/repos/elcodi/elcodi/issues{/number}","pulls_url":"https://api.github.com/repos/elcodi/elcodi/pulls{/number}","milestones_url":"https://api.github.com/repos/elcodi/elcodi/milestones{/number}","notifications_url":"https://api.github.com/repos/elcodi/elcodi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elcodi/elcodi/labels{/name}","releases_url":"https://api.github.com/repos/elcodi/elcodi/releases{/id}","created_at":"2014-04-03T17:26:10Z","updated_at":"2015-04-08T13:39:44Z","pushed_at":"2015-04-09T08:54:04Z","git_url":"git://github.com/elcodi/elcodi.git","ssh_url":"git@github.com:elcodi/elcodi.git","clone_url":"https://github.com/elcodi/elcodi.git","svn_url":"https://github.com/elcodi/elcodi","homepage":"http://elcodi.io","size":15305,"stargazers_count":272,"watchers_count":272,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":52,"forks":62,"open_issues":52,"watchers":272,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elcodi/elcodi/pulls/712"},"html":{"href":"https://github.com/elcodi/elcodi/pull/712"},"issue":{"href":"https://api.github.com/repos/elcodi/elcodi/issues/712"},"comments":{"href":"https://api.github.com/repos/elcodi/elcodi/issues/712/comments"},"review_comments":{"href":"https://api.github.com/repos/elcodi/elcodi/pulls/712/comments"},"review_comment":{"href":"https://api.github.com/repos/elcodi/elcodi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elcodi/elcodi/pulls/712/commits"},"statuses":{"href":"https://api.github.com/repos/elcodi/elcodi/statuses/7d469b88b028d2876c606720aa6af5381606853e"}}}}