diff options
author | Fbenas <philbeansburton@gmail.com> | 2018-05-07 14:42:15 +0100 |
---|---|---|
committer | Fbenas <philbeansburton@gmail.com> | 2018-05-07 14:42:15 +0100 |
commit | 33f00442f1667d57f94433834e0da4985670025b (patch) | |
tree | aa65df03e719f3d8024b0ea42a62aa7fd61f196e /src/Model/Menu.php | |
parent | c223ab602cbe7f6db7321ba547164971d63d7bcd (diff) |
Get filtering working with output
Diffstat (limited to 'src/Model/Menu.php')
-rw-r--r-- | src/Model/Menu.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/Model/Menu.php b/src/Model/Menu.php index e69de29..d0a281e 100644 --- a/src/Model/Menu.php +++ b/src/Model/Menu.php @@ -0,0 +1,38 @@ +<?php + +namespace App\Model; + +use App\Model\Model; + +/** + * Menu Model + */ +class Menu extends Model +{ + protected $name; + protected $allergies; + protected $advanceTime; + + + public function __construct($name, $allergies, $advanceTime) + { + $this->name = $name; + $this->allergies = $allergies; + $this->setTime($advanceTime); + } + + public function setTime($time) + { + $this->advanceTime = str_replace('h', '', $time); + } + + public function getAdvanceTime(): int + { + return $this->advanceTime; + } + + public function toString() + { + return $this->name . ';' . $this->allergies; + } +} |