Example #1
0
 /**
  * Locates and returns a single record.
  *
  * @param array $where
  * 
  * @return mixed
  * 		Implementation-defined return value.
  */
 public function findOne(array $where)
 {
     if ($postId = $this->extractPostId($where)) {
         return Post::forgeObject(get_post($postId));
     }
     $posts = get_posts($where);
     return empty($posts) ? null : Post::forgeObject(reset($posts));
 }
Example #2
0
 public function getPost()
 {
     return Model\Post\Post::instance();
 }