*/ class Console { /** * Create symfony application and add commands * * @author Phil Burton */ public function __construct() { $this->init(); } /** * Initalise * * @author Phil Burton */ protected function init() { // Define the root of the application define('APP_ROOT', realpath(dirname(__FILE__) . '/../../') . '/'); // Set default tiemzone date_default_timezone_set('Europe/London'); } /** * Run main application code * * @author Phil Burton */ public function exec() { $output = new Output; try { $input = new Input; $vendors = Vendor::loadAll($input->getOption('f')); $vendors->filterByInput($input); $output->printCollection($vendors); } catch (Exception $e) { $output->printException($e); } } }