_uri=new URI("Blog","/blog","/images/blog.svg"); } public function GetItems() { $repo=new BlogPostRepository(); $posts=$repo->GetLatest(5); $links=array(); foreach ($posts as $post){ $title=$post->PostTitle; if (strlen($title)>50) $title=substr($title,0,47).'...'; $links[]=new URI($title, "view/".$post->PostUrl); } $links[]=new URI("View all",""); return $links; } public function GetURI() { return $this->_uri; } }