outputs/HtmlOutput.php
d27cb747
 <?php
 /**
  * Created by IntelliJ IDEA.
  * User: cinan
  * Date: 5/13/13
  * Time: 2:13 AM
  * To change this template use File | Settings | File Templates.
  */
 
e421c421
 class HtmlOutput extends Output {
 
 	private $newLine = "<br>\n";
d27cb747
 
     public function display(){
         echo $this->output;
     }
e421c421
 
 	public function addMealHeader($restaurant)
 	{
 		$this->log("<strong>$restaurant</strong>");
 	}
 
 	public function startListing()
 	{
 		$this->log("<ul>");
 	}
 
 	public function endListing()
 	{
 		$this->log("</ul>");
 	}
 
 	public function addMeal($meal)
 	{
 		$this->log("\t<li>$meal</li>\n");
 	}
 
 	public function emptyRestaurant()
 	{
 		$this->log("<i>Hovno. Nic nemaju.</i>" . $this->newLine . $this->newLine);
 	}
 
 	public function addHeader(Restaurant $restaurant) {
 		$this->log("Restaurant: <a href='{$restaurant->getUrl()}'>" . $restaurant->getName() . "</a><br/>");
 	}
 
d27cb747
 }