summaryrefslogtreecommitdiff
path: root/src/Script/Console.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Script/Console.php')
-rw-r--r--src/Script/Console.php15
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);
}
}