/** * Tries to gather what we need for this task to run * * @param array $args CLI arguments * * @return Eve\Framework\Cli\Install */ public function setup($args) { if (!class_exists('\\ZipArchive')) { Index::error('Install needs the ZipArchive class. ' . 'See: http://php.net/manual/en/class.ziparchive.php'); } $this->databases['default']['host'] = Index::input('What is your database host (127.0.0.1)', '127.0.0.1'); $this->databases['default']['name'] = Index::input('What is your database name (eve_framework)', 'eve_framework'); $this->databases['default']['user'] = Index::input('What is your database username ? (root)', 'root'); $this->databases['default']['pass'] = Index::input('What is your database password ? (<nothing>)', ''); Index::error('Thanks. ' . floor(rand() % 1000) . ' questions to go..', false); Index::input('Continue ? (yes)'); Index::success('Just kidding, we are good to go :)'); if (!is_dir($this->cwd . '/tmp')) { mkdir($this->cwd . '/tmp'); } $this->file = fopen($this->cwd . '/tmp/framework.zip', 'w'); return $this; }