/** * 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)); }
public function getPost() { return Model\Post\Post::instance(); }