コード例 #1
0
 public function linkify($post)
 {
     return parent::linkify($post);
 }
コード例 #2
0
 public function arrayForPost(SocialMediaPost $post, $data = null)
 {
     $array = array('id' => $post->getID(), 'service' => $post->getServiceName(), 'postHTML' => nl2br($post->linkify($post->getBody())), 'postLinks' => $post->getLinks(), 'postImages' => $post->getImages(), 'created' => $post->getCreated()->format('U'), 'sort' => $post->getCreated()->format('U'), 'author' => $post->getAuthor());
     if (isset($data['feed'])) {
         $array['feed'] = $data['feed'];
         if ($author = $this->feeds[$data['feed']]->getUser($post->getAuthor())) {
             $array['authorName'] = $author->getName();
             $array['authorURL'] = $author->getProfileURL();
             $array['authorImageURL'] = $author->getImageURL();
         }
     }
     return $array;
 }