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/Script/Console.php | |
parent | c223ab602cbe7f6db7321ba547164971d63d7bcd (diff) |
Get filtering working with output
Diffstat (limited to 'src/Script/Console.php')
-rw-r--r-- | src/Script/Console.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Script/Console.php b/src/Script/Console.php index bedbc1d..e1d7df5 100644 --- a/src/Script/Console.php +++ b/src/Script/Console.php @@ -2,9 +2,9 @@ namespace App\Script; -// use App\Model\Vendor; +use App\Model\Vendor; use App\Script\Input; -// use App\Script\Output; +use App\Script\Output; /** * Main application class @@ -32,6 +32,9 @@ class Console { // Define the root of the application define('APP_ROOT', realpath(dirname(__FILE__) . '/../../') . '/'); + + // Set default tiemzone + date_default_timezone_set('Europe/London'); } /** @@ -41,12 +44,12 @@ class Console */ public function exec() { - $vendors = Vendor::loadAll(); $input = new Input; + $vendors = Vendor::loadAll($input->getOption('f')); $vendors->filterByInput($input); - // $output = new Output; - // - // $output->printCollection($vendors); + + $output = new Output; + $output->printCollection($vendors); } } |