{"action":"created","comment":{"url":"https://api.github.com/repos/thecodingmachine/html.renderer/pulls/comments/24331868","id":24331868,"diff_hunk":"@@ -1,271 +1,279 @@\n-<?php\r\n-/*\r\n- * Copyright (c) 2013 David Negrier\r\n- * \r\n- * See the file LICENSE.txt for copying permission.\r\n- */\r\n-\r\n-namespace Mouf\\Html\\Renderer;\r\n-\r\n-use Mouf\\Utils\\Cache\\CacheInterface;\r\n-use Mouf\\MoufException;\r\n-use Mouf\\MoufManager;\r\n-use Mouf\\Moufspector;\r\n-\r\n-/**\r\n- * This class is a renderer that renders objects using other renderers.\r\n- * The other renderers must be declared in Mouf.\r\n- * This renderer will automatically detect the renderers to be included.\r\n- * They must extend the ChainableRendererInterface interface.\r\n- *\r\n- * @author David Négrier <david@mouf-php.com>\r\n- */\r\n-class AutoChainRenderer implements CanSetTemplateRendererInterface {\r\n-\r\n-\t/**\r\n-\t * @var ChanableRendererInterface\r\n-\t */\r\n-\tprivate $templateRenderer;\r\n-\t/**\r\n-\t * @var ChanableRendererInterface[]\r\n-\t */\r\n-\tprivate $packageRenderers = array();\r\n-\t/**\r\n-\t * @var ChanableRendererInterface[]\r\n-\t */\r\n-\tprivate $customRenderers = array();\r\n-\t\r\n-\tprivate $cacheService;\r\n-\t\r\n-\tprivate $initDone = false;\r\n-\t\r\n-\t/**\r\n-\t * \r\n-\t * @param CacheInterface $cacheService This service is used to speed up the mapping between the object and the template.\r\n-\t */\r\n-\tpublic function __construct(CacheInterface $cacheService) {\r\n-\t\t$this->cacheService = $cacheService;\r\n-\t}\r\n-\t\r\n-\t/**\r\n-\t * (non-PHPdoc)\r\n-\t * @see \\Mouf\\Html\\Renderer\\RendererInterface::render()\r\n-\t */\r\n-\tpublic function render($object, $context = null) {\r\n-\t\t$renderer = $this->getRenderer($object, $context);\r\n-\t\tif ($renderer == null) {\r\n-\t\t\tthrow new \\Exception(\"Renderer not found. Unable to find renderer for object of class '\".get_class($object).\"'. Path tested: \".$this->getRendererDebugMessage($object, $context));\r\n-\t\t}\r\n-\t\t$renderer->render($object, $context);\r\n-\t}\r\n-\t\r\n-\t/**\r\n-\t * Sets the renderer associated to the template.\r\n-\t * There should be only one if these renderers.\r\n-\t * It is the role of the template to subscribe to this renderer.\r\n-\t * \r\n-\t * @param RendererInterface $templateRenderer\r\n-\t */\r\n-\tpublic function setTemplateRenderer(RendererInterface $templateRenderer) {\r\n-\t\t$this->templateRenderer = $templateRenderer;\r\n-\t}\r\n-\t\r\n-\tprivate function getRenderer($object, $context = null) {\r\n-\t\t$instanceName = $this->getInstanceName();\r\n-\t\t\r\n-\t\t$cacheKey = \"chainRendererByClass_\".$instanceName.\"/\".get_class($object).\"/\".$context;\r\n-\t\t$rendererName = $this->cacheService->get($cacheKey);\r\n-\t\tif ($rendererName != null) {\r\n-\t\t\treturn MoufManager::getMoufManager()->getInstance($rendererName);\r\n-\t\t}\r\n-\t\t\r\n-\t\t$this->initRenderersList();\r\n-\t\t\r\n-\t\t$isCachable = true;\r\n-\t\t$foundRenderer = null;\r\n-\t\t\r\n-\t\tdo {\r\n-\t\t\tforeach ($this->customRenderers as $renderer) {\r\n-\t\t\t\t/* @var $renderer ChainableRendererInterface */\r\n-\t\t\t\t$result = $renderer->canRender($object, $context);\r\n-\t\t\t\tif ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CANNOT_RENDER_OBJECT) {\r\n-\t\t\t\t\t$isCachable = false;\r\n-\t\t\t\t}\r\n-\t\t\t\tif ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CAN_RENDER_CLASS) {\r\n-\t\t\t\t\t$foundRenderer = $renderer;\r\n-\t\t\t\t\tbreak 2; \r\n-\t\t\t\t}\r\n-\t\t\t}\r\n-\t\t\t\r\n-\t\t\t/* @var $renderer ChainableRendererInterface */\r\n-\t\t\tif ($this->templateRenderer) {\r\n-\t\t\t\t$result = $this->templateRenderer->canRender($object, $context);\r\n-\t\t\t\tif ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CANNOT_RENDER_OBJECT) {\r\n-\t\t\t\t\t$isCachable = false;\r\n-\t\t\t\t}\r\n-\t\t\t\tif ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CAN_RENDER_CLASS) {\r\n-\t\t\t\t\t$foundRenderer = $this->templateRenderer;\r\n-\t\t\t\t\tbreak;\r\n-\t\t\t\t}\r\n-\t\t\t}\r\n-\t\t\t\r\n-\t\t\tforeach ($this->packageRenderers as $renderer) {\r\n-\t\t\t\t/* @var $renderer ChainableRendererInterface */\r\n-\t\t\t\t$result = $renderer->canRender($object, $context);\r\n-\t\t\t\tif ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CANNOT_RENDER_OBJECT) {\r\n-\t\t\t\t\t$isCachable = false;\r\n-\t\t\t\t}\r\n-\t\t\t\tif ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CAN_RENDER_CLASS) {\r\n-\t\t\t\t\t$foundRenderer = $renderer;\r\n-\t\t\t\t\tbreak 2;\r\n-\t\t\t\t}\r\n-\t\t\t}\r\n-\t\t\r\n-\t\t} while (false);\r\n-\t\t\r\n-\t\tif ($isCachable && $foundRenderer) {\r\n-\t\t\t// TODO: suboptimal\r\n-\t\t\t$this->cacheService->set($cacheKey, MoufManager::getMoufManager()->findInstanceName($foundRenderer));\r\n-\t\t}\r\n-\t\t\r\n-\t\treturn $foundRenderer;\r\n-\t}\r\n-\t\r\n-\t/**\r\n-\t * Returns a string explaining the steps done to find the renderer.\r\n-\t * \r\n-\t * @param object $object\r\n-\t * @param string $context\r\n-\t * @return string\r\n-\t */\r\n-\tprivate function getRendererDebugMessage($object, $context = null) {\r\n-\t\t$debugMessage = '';\r\n-\t\t\r\n-\t\t$this->initRenderersList();\r\n-\t\t\r\n-\t\t$isCachable = true;\r\n-\t\t$foundRenderer = null;\r\n-\t\t\r\n-\t\tdo {\r\n-\t\t\tforeach ($this->customRenderers as $renderer) {\r\n-\t\t\t\t/* @var $renderer ChainableRendererInterface */\r\n-\r\n-\t\t\t\t$debugMessage .= $renderer->debugCanRender($object, $context);\r\n-\t\t\t\t$result = $renderer->canRender($object, $context);\r\n-\t\t\t\tif ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CANNOT_RENDER_OBJECT) {\r\n-\t\t\t\t\t$isCachable = false;\r\n-\t\t\t\t}\r\n-\t\t\t\tif ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CAN_RENDER_CLASS) {\r\n-\t\t\t\t\t$foundRenderer = $renderer;\r\n-\t\t\t\t\tbreak 2;\r\n-\t\t\t\t}\r\n-\t\t\t}\r\n-\t\t\t\t\r\n-\t\t\t/* @var $renderer ChainableRendererInterface */\r\n-\t\t\tif ($this->templateRenderer) {\r\n-\t\t\t\t$debugMessage .= $this->templateRenderer->debugCanRender($object, $context);\r\n-\t\t\t\t$result = $this->templateRenderer->canRender($object, $context);\r\n-\t\t\t\tif ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CANNOT_RENDER_OBJECT) {\r\n-\t\t\t\t\t$isCachable = false;\r\n-\t\t\t\t}\r\n-\t\t\t\tif ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CAN_RENDER_CLASS) {\r\n-\t\t\t\t\t$foundRenderer = $this->templateRenderer;\r\n-\t\t\t\t\tbreak;\r\n-\t\t\t\t}\r\n-\t\t\t}\r\n-\t\t\t\t\r\n-\t\t\tforeach ($this->packageRenderers as $renderer) {\r\n-\t\t\t\t/* @var $renderer ChainableRendererInterface */\r\n-\t\t\t\t\r\n-\t\t\t\t$debugMessage .= $renderer->debugCanRender($object, $context);\r\n-\t\t\t\t$result = $renderer->canRender($object, $context);\r\n-\t\t\t\tif ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CANNOT_RENDER_OBJECT) {\r\n-\t\t\t\t\t$isCachable = false;\r\n-\t\t\t\t}\r\n-\t\t\t\tif ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CAN_RENDER_CLASS) {\r\n-\t\t\t\t\t$foundRenderer = $renderer;\r\n-\t\t\t\t\tbreak 2;\r\n-\t\t\t\t}\r\n-\t\t\t}\r\n-\t\t\r\n-\t\t} while (false);\r\n-\t\t\r\n-\t\treturn $debugMessage;\r\n-\t}\r\n-\t\r\n-\tprivate $instanceName;\r\n-\t\r\n-\tprivate function getInstanceName() {\r\n-\t\tif ($this->instanceName !== null) {\r\n-\t\t\treturn $this->instanceName;\r\n-\t\t}\r\n-\t\t$moufManager = MoufManager::getMoufManager();\r\n-\t\t// TODO: suboptimal. findInstanceName is not efficient.\r\n-\t\t$this->instanceName = $moufManager->findInstanceName($this);\r\n-\t\treturn $this->instanceName;\r\n-\t} \r\n-\t\r\n-\t/**\r\n-\t * Initializes the renderers list (from cache if available)\r\n-\t */\r\n-\tprivate function initRenderersList() {\r\n-\t\tif (!$this->initDone) {\r\n-\t\t\t$moufManager = MoufManager::getMoufManager();\r\n-\t\t\t// TODO: suboptimal. findInstanceName is not efficient.\r\n-\t\t\t$instanceName = $this->getInstanceName();\r\n-\t\t\t$renderersList = $this->cacheService->get(\"chainRenderer_\".$instanceName);\r\n-\t\t\tif ($renderersList === null) {\r\n-\t\t\t\t$renderersList = $this->queryRenderersList();\r\n-\t\t\t\t$this->cacheService->set(\"chainRenderer_\".$instanceName, $renderersList);\r\n-\t\t\t}\r\n-\t\t\t\r\n-\t\t\tif (isset($renderersList[ChainableRendererInterface::TYPE_CUSTOM])) {\r\n-\t\t\t\t$this->customRenderers = array_map(function($name) use ($moufManager) {\r\n-\t\t\t\t\treturn $moufManager->getInstance($name);\r\n-\t\t\t\t}, $renderersList[ChainableRendererInterface::TYPE_CUSTOM]);\r\n-\t\t\t}\r\n-\t\t\t\r\n-\t\t\tif (isset($renderersList[ChainableRendererInterface::TYPE_PACKAGE])) {\r\n-\t\t\t\t$this->packageRenderers = array_map(function($name) use ($moufManager) {\r\n-\t\t\t\t\treturn $moufManager->getInstance($name);\r\n-\t\t\t\t}, $renderersList[ChainableRendererInterface::TYPE_PACKAGE]);\r\n-\t\t\t}\r\n-\t\t\t\r\n-\t\t\t// Note: We ignore template renderers on purpose.\r\n-\t\t\t\r\n-\t\t\t$this->initDone = true;\r\n-\t\t}\r\n-\t}\r\n-\t\r\n-\t/**\r\n-\t * Returns an orderered list of renderers instance name to apply, separated by \"type\".\r\n-\t * \r\n-\t * @return array<string, string[]>\r\n-\t */\r\n-\tprivate function queryRenderersList() {\r\n-\t\t$moufManager = MoufManager::getMoufManager();\r\n-\t\t$renderersNames = $moufManager->findInstances('Mouf\\\\Html\\\\Renderer\\\\ChainableRendererInterface');\r\n-\t\t\r\n-\t\tforeach ($renderersNames as $name) {\r\n-\t\t\t$renderers[$name] = $moufManager->getInstance($name);\r\n-\t\t}\r\n-\t\t\r\n-\t\t$renderersByType = array();\r\n-\t\tforeach ($renderers as $name => $renderer) {\r\n-\t\t\t/* @var $renderer ChainableRendererInterface */\r\n-\t\t\t$renderersByType[$renderer->getRendererType()][] = $name;\r\n-\t\t}\r\n-\t\t\r\n-\t\t// Now, let's sort the renderers by priority (highest first).\r\n-\t\t$renderersByType = array_map(function(array $innerArray) use ($renderers) {\r\n-\t\t\tusort($innerArray, function($name1, $name2) use ($renderers) {\r\n-\t\t\t\t$item1 = $renderers[$name1];\r\n-\t\t\t\t$item2 = $renderers[$name2];\r\n-\t\t\t\treturn $item2->getPriority() - $item1->getPriority();\r\n-\t\t\t});\r\n-\t\t\treturn $innerArray;\r\n-\t\t}, $renderersByType);\r\n-\t\t\r\n-\t\treturn $renderersByType;\r\n-\t}\r\n-}\r\n+<?php\n+/*\n+ * Copyright (c) 2013 David Negrier\n+ *\n+ * See the file LICENSE.txt for copying permission.\n+ */\n+\n+namespace Mouf\\Html\\Renderer;\n+\n+use Mouf\\Utils\\Cache\\CacheInterface;\n+use Mouf\\MoufManager;\n+\n+/**\n+ * This class is a renderer that renders objects using other renderers.\n+ * The other renderers must be declared in Mouf.\n+ * This renderer will automatically detect the renderers to be included.\n+ * They must extend the ChainableRendererInterface interface.\n+ *\n+ * @author David Négrier <david@mouf-php.com>\n+ */\n+class AutoChainRenderer implements CanSetTemplateRendererInterface\n+{\n+\n+    /**\n+     * @var ChanableRendererInterface\n+     */\n+    private $templateRenderer;\n+    /**\n+     * @var ChanableRendererInterface[]\n+     */\n+    private $packageRenderers = array();\n+    /**\n+     * @var ChanableRendererInterface[]\n+     */\n+    private $customRenderers = array();\n+\n+    private $cacheService;\n+\n+    private $initDone = false;\n+\n+    /**\n+     *\n+     * @param CacheInterface $cacheService This service is used to speed up the mapping between the object and the template.\n+     */\n+    public function __construct(CacheInterface $cacheService)\n+    {\n+        $this->cacheService = $cacheService;\n+    }\n+\n+    /**\n+     * (non-PHPdoc)\n+     * @see \\Mouf\\Html\\Renderer\\RendererInterface::render()\n+     */\n+    public function render($object, $context = null)\n+    {\n+        $renderer = $this->getRenderer($object, $context);\n+        if ($renderer == null) {\n+            throw new \\Exception(\"Renderer not found. Unable to find renderer for object of class '\".get_class($object).\"'. Path tested: \".$this->getRendererDebugMessage($object, $context));\n+        }\n+        $renderer->render($object, $context);\n+    }\n+\n+    /**\n+     * Sets the renderer associated to the template.\n+     * There should be only one if these renderers.\n+     * It is the role of the template to subscribe to this renderer.\n+     *\n+     * @param RendererInterface $templateRenderer\n+     */\n+    public function setTemplateRenderer(RendererInterface $templateRenderer)\n+    {\n+        $this->templateRenderer = $templateRenderer;\n+    }\n+\n+    private function getRenderer($object, $context = null)\n+    {\n+        $instanceName = $this->getInstanceName();\n+\n+        $cacheKey = \"chainRendererByClass_\".$instanceName.\"/\".get_class($object).\"/\".$context;\n+        $rendererName = $this->cacheService->get($cacheKey);\n+        if ($rendererName != null) {\n+            return MoufManager::getMoufManager()->getInstance($rendererName);\n+        }\n+\n+        $this->initRenderersList();\n+\n+        $isCachable = true;\n+        $foundRenderer = null;\n+\n+        do {\n+            foreach ($this->customRenderers as $renderer) {\n+                /* @var $renderer ChainableRendererInterface */\n+                $result = $renderer->canRender($object, $context);\n+                if ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CANNOT_RENDER_OBJECT) {\n+                    $isCachable = false;\n+                }\n+                if ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CAN_RENDER_CLASS) {\n+                    $foundRenderer = $renderer;\n+                    break 2;\n+                }\n+            }\n+\n+            /* @var $renderer ChainableRendererInterface */\n+            if ($this->templateRenderer) {\n+                $result = $this->templateRenderer->canRender($object, $context);\n+                if ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CANNOT_RENDER_OBJECT) {\n+                    $isCachable = false;\n+                }\n+                if ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CAN_RENDER_CLASS) {\n+                    $foundRenderer = $this->templateRenderer;\n+                    break;\n+                }\n+            }\n+\n+            foreach ($this->packageRenderers as $renderer) {\n+                /* @var $renderer ChainableRendererInterface */\n+                $result = $renderer->canRender($object, $context);\n+                if ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CANNOT_RENDER_OBJECT) {\n+                    $isCachable = false;\n+                }\n+                if ($result == ChainableRendererInterface::CAN_RENDER_OBJECT || $result == ChainableRendererInterface::CAN_RENDER_CLASS) {\n+                    $foundRenderer = $renderer;\n+                    break 2;\n+                }\n+            }\n+        } while (false);\n+\n+        if ($isCachable && $foundRenderer) {\n+            // TODO: suboptimal","path":"src/Mouf/Html/Renderer/AutoChainRenderer.php","position":400,"original_position":400,"commit_id":"3e7ad0dd482f1df15e2a4801d85e653c495aac4b","original_commit_id":"3e7ad0dd482f1df15e2a4801d85e653c495aac4b","user":{"login":"cbalda","id":6704490,"avatar_url":"https://avatars.githubusercontent.com/u/6704490?v=3","gravatar_id":"","url":"https://api.github.com/users/cbalda","html_url":"https://github.com/cbalda","followers_url":"https://api.github.com/users/cbalda/followers","following_url":"https://api.github.com/users/cbalda/following{/other_user}","gists_url":"https://api.github.com/users/cbalda/gists{/gist_id}","starred_url":"https://api.github.com/users/cbalda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbalda/subscriptions","organizations_url":"https://api.github.com/users/cbalda/orgs","repos_url":"https://api.github.com/users/cbalda/repos","events_url":"https://api.github.com/users/cbalda/events{/privacy}","received_events_url":"https://api.github.com/users/cbalda/received_events","type":"User","site_admin":false},"body":"Is a \"TODO\" comment clean in your code ?","created_at":"2015-02-09T14:43:26Z","updated_at":"2015-02-09T14:43:26Z","html_url":"https://github.com/thecodingmachine/html.renderer/pull/5#discussion_r24331868","pull_request_url":"https://api.github.com/repos/thecodingmachine/html.renderer/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/thecodingmachine/html.renderer/pulls/comments/24331868"},"html":{"href":"https://github.com/thecodingmachine/html.renderer/pull/5#discussion_r24331868"},"pull_request":{"href":"https://api.github.com/repos/thecodingmachine/html.renderer/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/thecodingmachine/html.renderer/pulls/5","id":28923603,"html_url":"https://github.com/thecodingmachine/html.renderer/pull/5","diff_url":"https://github.com/thecodingmachine/html.renderer/pull/5.diff","patch_url":"https://github.com/thecodingmachine/html.renderer/pull/5.patch","issue_url":"https://api.github.com/repos/thecodingmachine/html.renderer/issues/5","number":5,"state":"closed","locked":false,"title":"Migrating to use any container (not only mouf) + badges + PSR-2","user":{"login":"moufmouf","id":1290952,"avatar_url":"https://avatars.githubusercontent.com/u/1290952?v=3","gravatar_id":"","url":"https://api.github.com/users/moufmouf","html_url":"https://github.com/moufmouf","followers_url":"https://api.github.com/users/moufmouf/followers","following_url":"https://api.github.com/users/moufmouf/following{/other_user}","gists_url":"https://api.github.com/users/moufmouf/gists{/gist_id}","starred_url":"https://api.github.com/users/moufmouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moufmouf/subscriptions","organizations_url":"https://api.github.com/users/moufmouf/orgs","repos_url":"https://api.github.com/users/moufmouf/repos","events_url":"https://api.github.com/users/moufmouf/events{/privacy}","received_events_url":"https://api.github.com/users/moufmouf/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-09T14:21:31Z","updated_at":"2015-02-09T14:43:26Z","closed_at":"2015-02-09T14:30:25Z","merged_at":"2015-02-09T14:30:25Z","merge_commit_sha":"4c44fca9c962e0e9b2921fd7475755000692f68a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thecodingmachine/html.renderer/pulls/5/commits","review_comments_url":"https://api.github.com/repos/thecodingmachine/html.renderer/pulls/5/comments","review_comment_url":"https://api.github.com/repos/thecodingmachine/html.renderer/pulls/comments/{number}","comments_url":"https://api.github.com/repos/thecodingmachine/html.renderer/issues/5/comments","statuses_url":"https://api.github.com/repos/thecodingmachine/html.renderer/statuses/3e7ad0dd482f1df15e2a4801d85e653c495aac4b","head":{"label":"moufmouf:1.3","ref":"1.3","sha":"3e7ad0dd482f1df15e2a4801d85e653c495aac4b","user":{"login":"moufmouf","id":1290952,"avatar_url":"https://avatars.githubusercontent.com/u/1290952?v=3","gravatar_id":"","url":"https://api.github.com/users/moufmouf","html_url":"https://github.com/moufmouf","followers_url":"https://api.github.com/users/moufmouf/followers","following_url":"https://api.github.com/users/moufmouf/following{/other_user}","gists_url":"https://api.github.com/users/moufmouf/gists{/gist_id}","starred_url":"https://api.github.com/users/moufmouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moufmouf/subscriptions","organizations_url":"https://api.github.com/users/moufmouf/orgs","repos_url":"https://api.github.com/users/moufmouf/repos","events_url":"https://api.github.com/users/moufmouf/events{/privacy}","received_events_url":"https://api.github.com/users/moufmouf/received_events","type":"User","site_admin":false},"repo":{"id":30538881,"name":"html.renderer","full_name":"moufmouf/html.renderer","owner":{"login":"moufmouf","id":1290952,"avatar_url":"https://avatars.githubusercontent.com/u/1290952?v=3","gravatar_id":"","url":"https://api.github.com/users/moufmouf","html_url":"https://github.com/moufmouf","followers_url":"https://api.github.com/users/moufmouf/followers","following_url":"https://api.github.com/users/moufmouf/following{/other_user}","gists_url":"https://api.github.com/users/moufmouf/gists{/gist_id}","starred_url":"https://api.github.com/users/moufmouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moufmouf/subscriptions","organizations_url":"https://api.github.com/users/moufmouf/orgs","repos_url":"https://api.github.com/users/moufmouf/repos","events_url":"https://api.github.com/users/moufmouf/events{/privacy}","received_events_url":"https://api.github.com/users/moufmouf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/moufmouf/html.renderer","description":"This package contains the rendering mechanism of the Mouf framework. It is a mechanism allowing packages/templates/developers to overload a default template for various HTML objects.","fork":true,"url":"https://api.github.com/repos/moufmouf/html.renderer","forks_url":"https://api.github.com/repos/moufmouf/html.renderer/forks","keys_url":"https://api.github.com/repos/moufmouf/html.renderer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moufmouf/html.renderer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moufmouf/html.renderer/teams","hooks_url":"https://api.github.com/repos/moufmouf/html.renderer/hooks","issue_events_url":"https://api.github.com/repos/moufmouf/html.renderer/issues/events{/number}","events_url":"https://api.github.com/repos/moufmouf/html.renderer/events","assignees_url":"https://api.github.com/repos/moufmouf/html.renderer/assignees{/user}","branches_url":"https://api.github.com/repos/moufmouf/html.renderer/branches{/branch}","tags_url":"https://api.github.com/repos/moufmouf/html.renderer/tags","blobs_url":"https://api.github.com/repos/moufmouf/html.renderer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moufmouf/html.renderer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moufmouf/html.renderer/git/refs{/sha}","trees_url":"https://api.github.com/repos/moufmouf/html.renderer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moufmouf/html.renderer/statuses/{sha}","languages_url":"https://api.github.com/repos/moufmouf/html.renderer/languages","stargazers_url":"https://api.github.com/repos/moufmouf/html.renderer/stargazers","contributors_url":"https://api.github.com/repos/moufmouf/html.renderer/contributors","subscribers_url":"https://api.github.com/repos/moufmouf/html.renderer/subscribers","subscription_url":"https://api.github.com/repos/moufmouf/html.renderer/subscription","commits_url":"https://api.github.com/repos/moufmouf/html.renderer/commits{/sha}","git_commits_url":"https://api.github.com/repos/moufmouf/html.renderer/git/commits{/sha}","comments_url":"https://api.github.com/repos/moufmouf/html.renderer/comments{/number}","issue_comment_url":"https://api.github.com/repos/moufmouf/html.renderer/issues/comments/{number}","contents_url":"https://api.github.com/repos/moufmouf/html.renderer/contents/{+path}","compare_url":"https://api.github.com/repos/moufmouf/html.renderer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moufmouf/html.renderer/merges","archive_url":"https://api.github.com/repos/moufmouf/html.renderer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moufmouf/html.renderer/downloads","issues_url":"https://api.github.com/repos/moufmouf/html.renderer/issues{/number}","pulls_url":"https://api.github.com/repos/moufmouf/html.renderer/pulls{/number}","milestones_url":"https://api.github.com/repos/moufmouf/html.renderer/milestones{/number}","notifications_url":"https://api.github.com/repos/moufmouf/html.renderer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moufmouf/html.renderer/labels{/name}","releases_url":"https://api.github.com/repos/moufmouf/html.renderer/releases{/id}","created_at":"2015-02-09T14:12:23Z","updated_at":"2015-02-09T14:12:23Z","pushed_at":"2015-02-09T14:20:45Z","git_url":"git://github.com/moufmouf/html.renderer.git","ssh_url":"git@github.com:moufmouf/html.renderer.git","clone_url":"https://github.com/moufmouf/html.renderer.git","svn_url":"https://github.com/moufmouf/html.renderer","homepage":null,"size":145,"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":"1.1"}},"base":{"label":"thecodingmachine:1.3","ref":"1.3","sha":"2dac6cbba585b9bb2d733dd7920eb275d8108fe2","user":{"login":"thecodingmachine","id":1847918,"avatar_url":"https://avatars.githubusercontent.com/u/1847918?v=3","gravatar_id":"","url":"https://api.github.com/users/thecodingmachine","html_url":"https://github.com/thecodingmachine","followers_url":"https://api.github.com/users/thecodingmachine/followers","following_url":"https://api.github.com/users/thecodingmachine/following{/other_user}","gists_url":"https://api.github.com/users/thecodingmachine/gists{/gist_id}","starred_url":"https://api.github.com/users/thecodingmachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecodingmachine/subscriptions","organizations_url":"https://api.github.com/users/thecodingmachine/orgs","repos_url":"https://api.github.com/users/thecodingmachine/repos","events_url":"https://api.github.com/users/thecodingmachine/events{/privacy}","received_events_url":"https://api.github.com/users/thecodingmachine/received_events","type":"Organization","site_admin":false},"repo":{"id":11547451,"name":"html.renderer","full_name":"thecodingmachine/html.renderer","owner":{"login":"thecodingmachine","id":1847918,"avatar_url":"https://avatars.githubusercontent.com/u/1847918?v=3","gravatar_id":"","url":"https://api.github.com/users/thecodingmachine","html_url":"https://github.com/thecodingmachine","followers_url":"https://api.github.com/users/thecodingmachine/followers","following_url":"https://api.github.com/users/thecodingmachine/following{/other_user}","gists_url":"https://api.github.com/users/thecodingmachine/gists{/gist_id}","starred_url":"https://api.github.com/users/thecodingmachine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecodingmachine/subscriptions","organizations_url":"https://api.github.com/users/thecodingmachine/orgs","repos_url":"https://api.github.com/users/thecodingmachine/repos","events_url":"https://api.github.com/users/thecodingmachine/events{/privacy}","received_events_url":"https://api.github.com/users/thecodingmachine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thecodingmachine/html.renderer","description":"This package contains the rendering mechanism of the Mouf framework. It is a mechanism allowing packages/templates/developers to overload a default template for various HTML objects.","fork":false,"url":"https://api.github.com/repos/thecodingmachine/html.renderer","forks_url":"https://api.github.com/repos/thecodingmachine/html.renderer/forks","keys_url":"https://api.github.com/repos/thecodingmachine/html.renderer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thecodingmachine/html.renderer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thecodingmachine/html.renderer/teams","hooks_url":"https://api.github.com/repos/thecodingmachine/html.renderer/hooks","issue_events_url":"https://api.github.com/repos/thecodingmachine/html.renderer/issues/events{/number}","events_url":"https://api.github.com/repos/thecodingmachine/html.renderer/events","assignees_url":"https://api.github.com/repos/thecodingmachine/html.renderer/assignees{/user}","branches_url":"https://api.github.com/repos/thecodingmachine/html.renderer/branches{/branch}","tags_url":"https://api.github.com/repos/thecodingmachine/html.renderer/tags","blobs_url":"https://api.github.com/repos/thecodingmachine/html.renderer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thecodingmachine/html.renderer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thecodingmachine/html.renderer/git/refs{/sha}","trees_url":"https://api.github.com/repos/thecodingmachine/html.renderer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thecodingmachine/html.renderer/statuses/{sha}","languages_url":"https://api.github.com/repos/thecodingmachine/html.renderer/languages","stargazers_url":"https://api.github.com/repos/thecodingmachine/html.renderer/stargazers","contributors_url":"https://api.github.com/repos/thecodingmachine/html.renderer/contributors","subscribers_url":"https://api.github.com/repos/thecodingmachine/html.renderer/subscribers","subscription_url":"https://api.github.com/repos/thecodingmachine/html.renderer/subscription","commits_url":"https://api.github.com/repos/thecodingmachine/html.renderer/commits{/sha}","git_commits_url":"https://api.github.com/repos/thecodingmachine/html.renderer/git/commits{/sha}","comments_url":"https://api.github.com/repos/thecodingmachine/html.renderer/comments{/number}","issue_comment_url":"https://api.github.com/repos/thecodingmachine/html.renderer/issues/comments/{number}","contents_url":"https://api.github.com/repos/thecodingmachine/html.renderer/contents/{+path}","compare_url":"https://api.github.com/repos/thecodingmachine/html.renderer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thecodingmachine/html.renderer/merges","archive_url":"https://api.github.com/repos/thecodingmachine/html.renderer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thecodingmachine/html.renderer/downloads","issues_url":"https://api.github.com/repos/thecodingmachine/html.renderer/issues{/number}","pulls_url":"https://api.github.com/repos/thecodingmachine/html.renderer/pulls{/number}","milestones_url":"https://api.github.com/repos/thecodingmachine/html.renderer/milestones{/number}","notifications_url":"https://api.github.com/repos/thecodingmachine/html.renderer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thecodingmachine/html.renderer/labels{/name}","releases_url":"https://api.github.com/repos/thecodingmachine/html.renderer/releases{/id}","created_at":"2013-07-20T13:40:52Z","updated_at":"2015-01-22T09:49:15Z","pushed_at":"2015-02-09T14:30:25Z","git_url":"git://github.com/thecodingmachine/html.renderer.git","ssh_url":"git@github.com:thecodingmachine/html.renderer.git","clone_url":"https://github.com/thecodingmachine/html.renderer.git","svn_url":"https://github.com/thecodingmachine/html.renderer","homepage":null,"size":368,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"1.1"}},"_links":{"self":{"href":"https://api.github.com/repos/thecodingmachine/html.renderer/pulls/5"},"html":{"href":"https://github.com/thecodingmachine/html.renderer/pull/5"},"issue":{"href":"https://api.github.com/repos/thecodingmachine/html.renderer/issues/5"},"comments":{"href":"https://api.github.com/repos/thecodingmachine/html.renderer/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/thecodingmachine/html.renderer/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/thecodingmachine/html.renderer/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/thecodingmachine/html.renderer/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/thecodingmachine/html.renderer/statuses/3e7ad0dd482f1df15e2a4801d85e653c495aac4b"}}}}