示例#1
0
 /**
  * @param Post $Post
  */
 public function savePost(Post $Post)
 {
     $tags = $Post->get(Post::FIELD_TAGS);
     foreach ($tags as $tag) {
         $this->getRedis()->zadd($this->getFeedName($tag), [$Post->getId() => $Post->get(Post::FIELD_CREATE_AT)]);
     }
 }
示例#2
0
 /**
  * @param Post $Post
  */
 public function savePost(Post $Post)
 {
     $ownerId = $Post->getOwner()->getId();
     $this->getRedis()->zadd($this->getFeedName($ownerId), [$Post->getId() => $Post->get(Post::FIELD_CREATE_AT)]);
 }
示例#3
0
 /**
  * @param Post $Post
  */
 public function savePost(Post $Post)
 {
     $this->getRedis()->zadd($this->getFeedName(), [$Post->getId() => $Post->get(Post::FIELD_CREATE_AT)]);
 }