public function __construct($arguments) { ini_set('display_errors', TRUE); error_reporting(E_ALL); $this->arguments = new Hymn_Arguments($arguments, $this->baseArgumentOptions); self::$fileName = $this->arguments->getOption('file'); try { if (getEnv('HTTP_HOST')) { throw new RuntimeException('Access denied'); } $action = $this->arguments->getArgument(); if ($this->arguments->getOption('help')) { array_unshift($arguments, "help"); $this->arguments = new Hymn_Arguments($arguments, $this->baseArgumentOptions); } else { if ($this->arguments->getOption('version')) { array_unshift($arguments, "version"); $this->arguments = new Hymn_Arguments($arguments, $this->baseArgumentOptions); } } if (!in_array($action, array('help', 'create', 'version'))) { $this->readConfig(); $this->loadLibraries(); // $this->setupDatabaseConnection(); } $this->dispatch(); // self::out(); } catch (Exception $e) { self::out("Error: " . $e->getMessage()); } }