protected function get_introduction() { $tag = ucwords($this->tag['tag']); if($this->page == 1) { global $container; $repository = new Jacobemerick\Web\Domain\Blog\Introduction\MysqlIntroductionRepository($container['db_connection_locator']); $introduction_result = $repository->findByType('tag', $this->tag['tag']); if($introduction_result !== false) { $introduction = array(); $introduction['title'] = $introduction_result['title']; $introduction['content'] = $introduction_result['content']; $introduction['image'] = $this->get_introduction_image($introduction_result['image']); return $introduction; } return array( 'title' => "Viewing posts about {$tag}."); } return array( 'title' => "{$tag} posts, page {$this->page} of {$this->total_pages}."); }
protected function get_introduction() { global $container; $repository = new Jacobemerick\Web\Domain\Blog\Introduction\MysqlIntroductionRepository($container['db_connection_locator']); $introduction_result = $repository->findByType('about'); if($introduction_result !== null) { $introduction = array(); $introduction['title'] = $introduction_result['title']; $introduction['content'] = $introduction_result['content']; $introduction['image'] = $this->get_introduction_image($introduction_result['image']); return $introduction; } }
protected function get_introduction() { if($this->page == 1) { global $container; $repository = new Jacobemerick\Web\Domain\Blog\Introduction\MysqlIntroductionRepository($container['db_connection_locator']); $introduction_result = $repository->findByType('home'); $introduction = array(); $introduction['title'] = $introduction_result['title']; $introduction['content'] = $introduction_result['content']; $introduction['image'] = $this->get_introduction_image($introduction_result['image']); return $introduction; } return array( 'title' => "All of Jacob Emerick's posts, page {$this->page} of {$this->total_pages}."); }