{"action":"created","comment":{"url":"https://api.github.com/repos/cargomedia/CM/pulls/comments/32397385","id":32397385,"diff_hunk":"@@ -0,0 +1,48 @@\n+<?php\n+\n+class CM_Frontend_TemplateHelper_ContentPlaceholder {\n+\n+    /**\n+     * @param string    $content\n+     * @param int|null  $width\n+     * @param int|null  $height\n+     * @param bool|null $stretch\n+     * @return string\n+     */\n+    public static function create($content, $width = null, $height = null, $stretch = null) {\n+        if (null === $width) {\n+            $width = 1;\n+        }\n+        if (null === $height) {\n+            $height = 1;\n+        }\n+        $stretch = (bool) $stretch;\n+        $imageData = self::_createBlankImage($width, $height);\n+        $imageSrc = 'data:image/png;base64,' . base64_encode($imageData);\n+\n+        $output = '<div class=\"contentPlaceholder' . ($stretch ? ' stretch' : '') . '\">';\n+        $output .= '<img class=\"contentPlaceholder-size\" src=\"' . $imageSrc . '\"/>';\n+        $output .= $content;\n+\n+        $output .= '</div>';\n+        return $output;\n+    }\n+\n+    /**\n+     * @param int $width\n+     * @param int $height\n+     * @return string\n+     */\n+    private static function _createBlankImage($width, $height) {\n+        $cache = CM_Cache_Local::getInstance();\n+        return $cache->get($cache->key(CM_CacheConst::Frontend_TemplateHelper_ContentPlaceholder, $width, $height), function () use ($width, $height) {","path":"library/CM/Frontend/TemplateHelper/ContentPlaceholder.php","position":38,"original_position":38,"commit_id":"447d5eaa0a6ec4c1839147fe17950fc402313101","original_commit_id":"447d5eaa0a6ec4c1839147fe17950fc402313101","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":"I would not even use a cache-const here!\r\nSee this note: https://github.com/cargomedia/CM/pull/1737#issue-69310775","created_at":"2015-06-15T07:46:07Z","updated_at":"2015-06-15T07:46:07Z","html_url":"https://github.com/cargomedia/CM/pull/1707#discussion_r32397385","pull_request_url":"https://api.github.com/repos/cargomedia/CM/pulls/1707","_links":{"self":{"href":"https://api.github.com/repos/cargomedia/CM/pulls/comments/32397385"},"html":{"href":"https://github.com/cargomedia/CM/pull/1707#discussion_r32397385"},"pull_request":{"href":"https://api.github.com/repos/cargomedia/CM/pulls/1707"}}},"pull_request":{"url":"https://api.github.com/repos/cargomedia/CM/pulls/1707","id":31937010,"html_url":"https://github.com/cargomedia/CM/pull/1707","diff_url":"https://github.com/cargomedia/CM/pull/1707.diff","patch_url":"https://github.com/cargomedia/CM/pull/1707.patch","issue_url":"https://api.github.com/repos/cargomedia/CM/issues/1707","number":1707,"state":"open","locked":false,"title":"Add jquery.lazyload.","user":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"body":"For image lazy loading.","created_at":"2015-03-25T16:03:34Z","updated_at":"2015-06-15T07:46:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52420e5444e182d1b1d6e1e22cc7caca6f9783e3","assignee":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/cargomedia/CM/pulls/1707/commits","review_comments_url":"https://api.github.com/repos/cargomedia/CM/pulls/1707/comments","review_comment_url":"https://api.github.com/repos/cargomedia/CM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cargomedia/CM/issues/1707/comments","statuses_url":"https://api.github.com/repos/cargomedia/CM/statuses/447d5eaa0a6ec4c1839147fe17950fc402313101","head":{"label":"vogdb:issue-1707","ref":"issue-1707","sha":"447d5eaa0a6ec4c1839147fe17950fc402313101","user":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"repo":{"id":23101151,"name":"CM","full_name":"vogdb/CM","owner":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vogdb/CM","description":"CM web application framework","fork":true,"url":"https://api.github.com/repos/vogdb/CM","forks_url":"https://api.github.com/repos/vogdb/CM/forks","keys_url":"https://api.github.com/repos/vogdb/CM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vogdb/CM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vogdb/CM/teams","hooks_url":"https://api.github.com/repos/vogdb/CM/hooks","issue_events_url":"https://api.github.com/repos/vogdb/CM/issues/events{/number}","events_url":"https://api.github.com/repos/vogdb/CM/events","assignees_url":"https://api.github.com/repos/vogdb/CM/assignees{/user}","branches_url":"https://api.github.com/repos/vogdb/CM/branches{/branch}","tags_url":"https://api.github.com/repos/vogdb/CM/tags","blobs_url":"https://api.github.com/repos/vogdb/CM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vogdb/CM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vogdb/CM/git/refs{/sha}","trees_url":"https://api.github.com/repos/vogdb/CM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vogdb/CM/statuses/{sha}","languages_url":"https://api.github.com/repos/vogdb/CM/languages","stargazers_url":"https://api.github.com/repos/vogdb/CM/stargazers","contributors_url":"https://api.github.com/repos/vogdb/CM/contributors","subscribers_url":"https://api.github.com/repos/vogdb/CM/subscribers","subscription_url":"https://api.github.com/repos/vogdb/CM/subscription","commits_url":"https://api.github.com/repos/vogdb/CM/commits{/sha}","git_commits_url":"https://api.github.com/repos/vogdb/CM/git/commits{/sha}","comments_url":"https://api.github.com/repos/vogdb/CM/comments{/number}","issue_comment_url":"https://api.github.com/repos/vogdb/CM/issues/comments{/number}","contents_url":"https://api.github.com/repos/vogdb/CM/contents/{+path}","compare_url":"https://api.github.com/repos/vogdb/CM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vogdb/CM/merges","archive_url":"https://api.github.com/repos/vogdb/CM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vogdb/CM/downloads","issues_url":"https://api.github.com/repos/vogdb/CM/issues{/number}","pulls_url":"https://api.github.com/repos/vogdb/CM/pulls{/number}","milestones_url":"https://api.github.com/repos/vogdb/CM/milestones{/number}","notifications_url":"https://api.github.com/repos/vogdb/CM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vogdb/CM/labels{/name}","releases_url":"https://api.github.com/repos/vogdb/CM/releases{/id}","created_at":"2014-08-19T07:34:20Z","updated_at":"2015-05-08T12:54:59Z","pushed_at":"2015-06-11T14:04:55Z","git_url":"git://github.com/vogdb/CM.git","ssh_url":"git@github.com:vogdb/CM.git","clone_url":"https://github.com/vogdb/CM.git","svn_url":"https://github.com/vogdb/CM","homepage":"","size":29405,"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":"cargomedia:master","ref":"master","sha":"7a1ebb6febfdb9d4bb6529d0bc568d6e218355b2","user":{"login":"cargomedia","id":1699929,"avatar_url":"https://avatars.githubusercontent.com/u/1699929?v=3","gravatar_id":"","url":"https://api.github.com/users/cargomedia","html_url":"https://github.com/cargomedia","followers_url":"https://api.github.com/users/cargomedia/followers","following_url":"https://api.github.com/users/cargomedia/following{/other_user}","gists_url":"https://api.github.com/users/cargomedia/gists{/gist_id}","starred_url":"https://api.github.com/users/cargomedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cargomedia/subscriptions","organizations_url":"https://api.github.com/users/cargomedia/orgs","repos_url":"https://api.github.com/users/cargomedia/repos","events_url":"https://api.github.com/users/cargomedia/events{/privacy}","received_events_url":"https://api.github.com/users/cargomedia/received_events","type":"Organization","site_admin":false},"repo":{"id":7134007,"name":"CM","full_name":"cargomedia/CM","owner":{"login":"cargomedia","id":1699929,"avatar_url":"https://avatars.githubusercontent.com/u/1699929?v=3","gravatar_id":"","url":"https://api.github.com/users/cargomedia","html_url":"https://github.com/cargomedia","followers_url":"https://api.github.com/users/cargomedia/followers","following_url":"https://api.github.com/users/cargomedia/following{/other_user}","gists_url":"https://api.github.com/users/cargomedia/gists{/gist_id}","starred_url":"https://api.github.com/users/cargomedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cargomedia/subscriptions","organizations_url":"https://api.github.com/users/cargomedia/orgs","repos_url":"https://api.github.com/users/cargomedia/repos","events_url":"https://api.github.com/users/cargomedia/events{/privacy}","received_events_url":"https://api.github.com/users/cargomedia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cargomedia/CM","description":"CM web application framework","fork":false,"url":"https://api.github.com/repos/cargomedia/CM","forks_url":"https://api.github.com/repos/cargomedia/CM/forks","keys_url":"https://api.github.com/repos/cargomedia/CM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cargomedia/CM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cargomedia/CM/teams","hooks_url":"https://api.github.com/repos/cargomedia/CM/hooks","issue_events_url":"https://api.github.com/repos/cargomedia/CM/issues/events{/number}","events_url":"https://api.github.com/repos/cargomedia/CM/events","assignees_url":"https://api.github.com/repos/cargomedia/CM/assignees{/user}","branches_url":"https://api.github.com/repos/cargomedia/CM/branches{/branch}","tags_url":"https://api.github.com/repos/cargomedia/CM/tags","blobs_url":"https://api.github.com/repos/cargomedia/CM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cargomedia/CM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cargomedia/CM/git/refs{/sha}","trees_url":"https://api.github.com/repos/cargomedia/CM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cargomedia/CM/statuses/{sha}","languages_url":"https://api.github.com/repos/cargomedia/CM/languages","stargazers_url":"https://api.github.com/repos/cargomedia/CM/stargazers","contributors_url":"https://api.github.com/repos/cargomedia/CM/contributors","subscribers_url":"https://api.github.com/repos/cargomedia/CM/subscribers","subscription_url":"https://api.github.com/repos/cargomedia/CM/subscription","commits_url":"https://api.github.com/repos/cargomedia/CM/commits{/sha}","git_commits_url":"https://api.github.com/repos/cargomedia/CM/git/commits{/sha}","comments_url":"https://api.github.com/repos/cargomedia/CM/comments{/number}","issue_comment_url":"https://api.github.com/repos/cargomedia/CM/issues/comments{/number}","contents_url":"https://api.github.com/repos/cargomedia/CM/contents/{+path}","compare_url":"https://api.github.com/repos/cargomedia/CM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cargomedia/CM/merges","archive_url":"https://api.github.com/repos/cargomedia/CM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cargomedia/CM/downloads","issues_url":"https://api.github.com/repos/cargomedia/CM/issues{/number}","pulls_url":"https://api.github.com/repos/cargomedia/CM/pulls{/number}","milestones_url":"https://api.github.com/repos/cargomedia/CM/milestones{/number}","notifications_url":"https://api.github.com/repos/cargomedia/CM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cargomedia/CM/labels{/name}","releases_url":"https://api.github.com/repos/cargomedia/CM/releases{/id}","created_at":"2012-12-12T17:00:30Z","updated_at":"2015-05-07T11:04:07Z","pushed_at":"2015-06-15T07:40:46Z","git_url":"git://github.com/cargomedia/CM.git","ssh_url":"git@github.com:cargomedia/CM.git","clone_url":"https://github.com/cargomedia/CM.git","svn_url":"https://github.com/cargomedia/CM","homepage":"","size":37218,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":40,"forks":15,"open_issues":40,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cargomedia/CM/pulls/1707"},"html":{"href":"https://github.com/cargomedia/CM/pull/1707"},"issue":{"href":"https://api.github.com/repos/cargomedia/CM/issues/1707"},"comments":{"href":"https://api.github.com/repos/cargomedia/CM/issues/1707/comments"},"review_comments":{"href":"https://api.github.com/repos/cargomedia/CM/pulls/1707/comments"},"review_comment":{"href":"https://api.github.com/repos/cargomedia/CM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cargomedia/CM/pulls/1707/commits"},"statuses":{"href":"https://api.github.com/repos/cargomedia/CM/statuses/447d5eaa0a6ec4c1839147fe17950fc402313101"}}}}