{"action":"created","comment":{"url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls/comments/26587642","id":26587642,"diff_hunk":"@@ -0,0 +1,64 @@\n+<?php\n+/**\n+ * ElementProcessor.php\n+ * Definition of class ElementProcessor\n+ * \n+ * Created 16-Mar-2015 12:04:54\n+ *\n+ * @author M.D.Ward <matthew.ward@byng.co>\n+ * @copyright (c) 2015, Byng Services Ltd\n+ */\n+namespace ElasticSearch\\Processor\\Page;\n+\n+use Document_Tag;\n+use ElasticSearch\\Processor\\ProcessorException;\n+use NF\\HtmlToText;\n+use Object_Abstract;\n+\n+\n+\n+/**\n+ * ElementProcessor\n+ * \n+ * @author M.D.Ward <matthew.ward@byng.co>\n+ */\n+class ElementProcessor\n+{\n+\n+    /**\n+     *\n+     * @var HtmlToText\n+     */\n+    protected $htmlToTextFilter;\n+    \n+    \n+    \n+    /**\n+     * \n+     * @param HtmlToText $htmlToTextFilter\n+     */\n+    public function __construct(HtmlToText $htmlToTextFilter)\n+    {\n+        $this->htmlToTextFilter = $htmlToTextFilter;\n+    }\n+    \n+    /**\n+     * \n+     * @param Document_Tag $tag\n+     * @return string\n+     * @throws ProcessorException\n+     */\n+    public function processElement(Document_Tag $tag)\n+    {\n+        $elementData = $tag->getData();\n+        \n+        if (!is_string($elementData) || ($elementData = trim($elementData)) === '') {","path":"lib/ElasticSearch/Processor/Page/ElementProcessor.php","position":55,"original_position":55,"commit_id":"e4bfbaf9545ecd53e61bd503ce89e8c219845a3c","original_commit_id":"e4bfbaf9545ecd53e61bd503ce89e8c219845a3c","user":{"login":"SeerUK","id":2083033,"avatar_url":"https://avatars.githubusercontent.com/u/2083033?v=3","gravatar_id":"","url":"https://api.github.com/users/SeerUK","html_url":"https://github.com/SeerUK","followers_url":"https://api.github.com/users/SeerUK/followers","following_url":"https://api.github.com/users/SeerUK/following{/other_user}","gists_url":"https://api.github.com/users/SeerUK/gists{/gist_id}","starred_url":"https://api.github.com/users/SeerUK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeerUK/subscriptions","organizations_url":"https://api.github.com/users/SeerUK/orgs","repos_url":"https://api.github.com/users/SeerUK/repos","events_url":"https://api.github.com/users/SeerUK/events{/privacy}","received_events_url":"https://api.github.com/users/SeerUK/received_events","type":"User","site_admin":false},"body":"Maybe move the trim up to line 53, so you don't have to assign in the if?","created_at":"2015-03-17T16:13:39Z","updated_at":"2015-03-17T16:13:39Z","html_url":"https://github.com/byng-systems/pimcore-elastic-search-plugin/pull/2#discussion_r26587642","pull_request_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls/comments/26587642"},"html":{"href":"https://github.com/byng-systems/pimcore-elastic-search-plugin/pull/2#discussion_r26587642"},"pull_request":{"href":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls/2","id":31338925,"html_url":"https://github.com/byng-systems/pimcore-elastic-search-plugin/pull/2","diff_url":"https://github.com/byng-systems/pimcore-elastic-search-plugin/pull/2.diff","patch_url":"https://github.com/byng-systems/pimcore-elastic-search-plugin/pull/2.patch","issue_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/issues/2","number":2,"state":"open","locked":false,"title":"Incorporated index \"clearing\" functionality and added to CacheAllPagesJob","user":{"login":"mdjward","id":4046455,"avatar_url":"https://avatars.githubusercontent.com/u/4046455?v=3","gravatar_id":"","url":"https://api.github.com/users/mdjward","html_url":"https://github.com/mdjward","followers_url":"https://api.github.com/users/mdjward/followers","following_url":"https://api.github.com/users/mdjward/following{/other_user}","gists_url":"https://api.github.com/users/mdjward/gists{/gist_id}","starred_url":"https://api.github.com/users/mdjward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdjward/subscriptions","organizations_url":"https://api.github.com/users/mdjward/orgs","repos_url":"https://api.github.com/users/mdjward/repos","events_url":"https://api.github.com/users/mdjward/events{/privacy}","received_events_url":"https://api.github.com/users/mdjward/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-17T14:21:36Z","updated_at":"2015-03-17T16:13:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac51663c3823d9520e245a27426582337baca603","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls/2/commits","review_comments_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls/2/comments","review_comment_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/issues/2/comments","statuses_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/statuses/e4bfbaf9545ecd53e61bd503ce89e8c219845a3c","head":{"label":"byng-systems:development-page_rebuild_maintenance","ref":"development-page_rebuild_maintenance","sha":"e4bfbaf9545ecd53e61bd503ce89e8c219845a3c","user":{"login":"byng-systems","id":2078038,"avatar_url":"https://avatars.githubusercontent.com/u/2078038?v=3","gravatar_id":"","url":"https://api.github.com/users/byng-systems","html_url":"https://github.com/byng-systems","followers_url":"https://api.github.com/users/byng-systems/followers","following_url":"https://api.github.com/users/byng-systems/following{/other_user}","gists_url":"https://api.github.com/users/byng-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/byng-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byng-systems/subscriptions","organizations_url":"https://api.github.com/users/byng-systems/orgs","repos_url":"https://api.github.com/users/byng-systems/repos","events_url":"https://api.github.com/users/byng-systems/events{/privacy}","received_events_url":"https://api.github.com/users/byng-systems/received_events","type":"Organization","site_admin":false},"repo":{"id":28088771,"name":"pimcore-elastic-search-plugin","full_name":"byng-systems/pimcore-elastic-search-plugin","owner":{"login":"byng-systems","id":2078038,"avatar_url":"https://avatars.githubusercontent.com/u/2078038?v=3","gravatar_id":"","url":"https://api.github.com/users/byng-systems","html_url":"https://github.com/byng-systems","followers_url":"https://api.github.com/users/byng-systems/followers","following_url":"https://api.github.com/users/byng-systems/following{/other_user}","gists_url":"https://api.github.com/users/byng-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/byng-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byng-systems/subscriptions","organizations_url":"https://api.github.com/users/byng-systems/orgs","repos_url":"https://api.github.com/users/byng-systems/repos","events_url":"https://api.github.com/users/byng-systems/events{/privacy}","received_events_url":"https://api.github.com/users/byng-systems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/byng-systems/pimcore-elastic-search-plugin","description":"","fork":false,"url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin","forks_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/forks","keys_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/teams","hooks_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/hooks","issue_events_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/events","assignees_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/tags","blobs_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/languages","stargazers_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/stargazers","contributors_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/contributors","subscribers_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/subscribers","subscription_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/subscription","commits_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/merges","archive_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/downloads","issues_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/labels{/name}","releases_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/releases{/id}","created_at":"2014-12-16T13:44:32Z","updated_at":"2015-03-16T22:54:50Z","pushed_at":"2015-03-17T14:19:42Z","git_url":"git://github.com/byng-systems/pimcore-elastic-search-plugin.git","ssh_url":"git@github.com:byng-systems/pimcore-elastic-search-plugin.git","clone_url":"https://github.com/byng-systems/pimcore-elastic-search-plugin.git","svn_url":"https://github.com/byng-systems/pimcore-elastic-search-plugin","homepage":null,"size":149,"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":"development"}},"base":{"label":"byng-systems:development","ref":"development","sha":"6f829ee4f70697e0fe329b08a42ebf7fbf7bd456","user":{"login":"byng-systems","id":2078038,"avatar_url":"https://avatars.githubusercontent.com/u/2078038?v=3","gravatar_id":"","url":"https://api.github.com/users/byng-systems","html_url":"https://github.com/byng-systems","followers_url":"https://api.github.com/users/byng-systems/followers","following_url":"https://api.github.com/users/byng-systems/following{/other_user}","gists_url":"https://api.github.com/users/byng-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/byng-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byng-systems/subscriptions","organizations_url":"https://api.github.com/users/byng-systems/orgs","repos_url":"https://api.github.com/users/byng-systems/repos","events_url":"https://api.github.com/users/byng-systems/events{/privacy}","received_events_url":"https://api.github.com/users/byng-systems/received_events","type":"Organization","site_admin":false},"repo":{"id":28088771,"name":"pimcore-elastic-search-plugin","full_name":"byng-systems/pimcore-elastic-search-plugin","owner":{"login":"byng-systems","id":2078038,"avatar_url":"https://avatars.githubusercontent.com/u/2078038?v=3","gravatar_id":"","url":"https://api.github.com/users/byng-systems","html_url":"https://github.com/byng-systems","followers_url":"https://api.github.com/users/byng-systems/followers","following_url":"https://api.github.com/users/byng-systems/following{/other_user}","gists_url":"https://api.github.com/users/byng-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/byng-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byng-systems/subscriptions","organizations_url":"https://api.github.com/users/byng-systems/orgs","repos_url":"https://api.github.com/users/byng-systems/repos","events_url":"https://api.github.com/users/byng-systems/events{/privacy}","received_events_url":"https://api.github.com/users/byng-systems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/byng-systems/pimcore-elastic-search-plugin","description":"","fork":false,"url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin","forks_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/forks","keys_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/teams","hooks_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/hooks","issue_events_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/events","assignees_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/tags","blobs_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/languages","stargazers_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/stargazers","contributors_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/contributors","subscribers_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/subscribers","subscription_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/subscription","commits_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/merges","archive_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/downloads","issues_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/labels{/name}","releases_url":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/releases{/id}","created_at":"2014-12-16T13:44:32Z","updated_at":"2015-03-16T22:54:50Z","pushed_at":"2015-03-17T14:19:42Z","git_url":"git://github.com/byng-systems/pimcore-elastic-search-plugin.git","ssh_url":"git@github.com:byng-systems/pimcore-elastic-search-plugin.git","clone_url":"https://github.com/byng-systems/pimcore-elastic-search-plugin.git","svn_url":"https://github.com/byng-systems/pimcore-elastic-search-plugin","homepage":null,"size":149,"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":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls/2"},"html":{"href":"https://github.com/byng-systems/pimcore-elastic-search-plugin/pull/2"},"issue":{"href":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/issues/2"},"comments":{"href":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/byng-systems/pimcore-elastic-search-plugin/statuses/e4bfbaf9545ecd53e61bd503ce89e8c219845a3c"}}}}