GitHub PullRequestReviewCommentEvent at 2014-03-27 21:19:39
Repository: SeoBundle
Actor: WouterJ
Payload: {"comment":{"url":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/comments/11045565","id":11045565,"diff_hunk":"@@ -0,0 +1,182 @@\n+<?php\n+\n+namespace Symfony\\Cmf\\Bundle\\SeoBundle\\Model;\n+\n+\n+use Symfony\\Cmf\\Bundle\\CoreBundle\\Translatable\\TranslatableInterface;\n+use Symfony\\Cmf\\Bundle\\SeoBundle\\Extractor\\SeoDescriptionInterface;\n+use Symfony\\Cmf\\Bundle\\SeoBundle\\Extractor\\SeoOriginalUrlInterface;\n+use Symfony\\Cmf\\Bundle\\SeoBundle\\Extractor\\SeoTitleInterface;\n+\n+class SeoAwareContent implements\n+    SeoAwareInterface,\n+    SeoTitleInterface,\n+    SeoDescriptionInterface,\n+    SeoOriginalUrlInterface,\n+    TranslatableInterface\n+{\n+    /**\n+     * Primary identifier, details depend on storage layer.\n+     */\n+    protected $id;\n+\n+    /**\n+     * @var string\n+     */\n+    protected $title;\n+\n+    /**\n+     * @var string\n+     */\n+    protected $body;\n+\n+    /**\n+     * @var SeoMetadata\n+     */\n+    protected $seoMetadata;\n+\n+    /**\n+     * @return mixed\n+     */\n+    public function getId()\n+    {\n+        return $this->id;\n+    }\n+\n+    /**\n+     * @var string\n+     */\n+    private $locale;\n+\n+    /**\n+     * @return string\n+     */\n+    public function getTitle()\n+    {\n+        return $this->title;\n+    }\n+\n+    /**\n+     * @param string $title\n+     */\n+    public function setTitle($title)\n+    {\n+        $this->title = $title;\n+    }\n+\n+    /**\n+     * @return string\n+     */\n+    public function getBody()\n+    {\n+        return $this->body;\n+    }\n+\n+    /**\n+     * @param string $body\n+     */\n+    public function setBody($body)\n+    {\n+        $this->body = $body;\n+    }\n+\n+    /**\n+     * Any content model can handle its seo properties. By implementing\n+     * this interface a model has to return its class for all the seo properties.\n+     *\n+     * @return SeoMetadata\n+     */\n+    public function getSeoMetadata()\n+    {\n+        return $this->seoMetadata;\n+    }\n+\n+    /**\n+     * @param SeoMetadata $seoMetadata\n+     */\n+    public function setSeoMetadata($seoMetadata)\n+    {\n+        $this->seoMetadata= $seoMetadata;\n+    }\n+\n+\n+    /**\n+     * @return string|boolean The locale of this model or false if\n+     *                        translations are disabled in this project.\n+     */\n+    public function getLocale()\n+    {\n+        return $this->locale;\n+    }\n+\n+    /**\n+     * @param string|boolean $locale The local for this model, or false if\n+     *                               translations are disabled in this project.\n+     */\n+    public function setLocale($locale)\n+    {\n+        $this->locale = $locale;\n+    }\n+\n+    /**\n+     * need to convert the object into an array, which can be persisted in\n+     * with the phpcr\n+     * @todo write issue to persist objects same way like arrays\n+     */\n+    public function preFlush()\n+    {\n+        $this->seoMetadata = $this->seoMetadata->toArray();\n+    }\n+\n+    /**\n+     * wil set the information back to the seoMetadataMetadata object to handle it easier\n+     */","path":"Model/SeoAwareContent.php","position":133,"original_position":133,"commit_id":"da17e61561ac16a6cf2479c198cee1a92ec258be","original_commit_id":"da17e61561ac16a6cf2479c198cee1a92ec258be","user":{"login":"WouterJ","id":749025,"avatar_url":"https://avatars.githubusercontent.com/u/749025?","gravatar_id":"331582449435f5efa35be870ab76f1a9","url":"https://api.github.com/users/WouterJ","html_url":"https://github.com/WouterJ","followers_url":"https://api.github.com/users/WouterJ/followers","following_url":"https://api.github.com/users/WouterJ/following{/other_user}","gists_url":"https://api.github.com/users/WouterJ/gists{/gist_id}","starred_url":"https://api.github.com/users/WouterJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WouterJ/subscriptions","organizations_url":"https://api.github.com/users/WouterJ/orgs","repos_url":"https://api.github.com/users/WouterJ/repos","events_url":"https://api.github.com/users/WouterJ/events{/privacy}","received_events_url":"https://api.github.com/users/WouterJ/received_events","type":"User","site_admin":false},"body":"Sets the information back to a SeoMetadata object to make it easier to use","created_at":"2014-03-27T21:19:39Z","updated_at":"2014-03-27T21:19:39Z","html_url":"https://github.com/symfony-cmf/SeoBundle/pull/72#discussion_r11045565","pull_request_url":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/comments/11045565"},"html":{"href":"https://github.com/symfony-cmf/SeoBundle/pull/72#discussion_r11045565"},"pull_request":{"href":"https://api.github.com/repos/symfony-cmf/SeoBundle/pulls/72"}}}}