本文整理汇总了PHP中Index::input方法的典型用法代码示例。如果您正苦于以下问题:PHP Index::input方法的具体用法?PHP Index::input怎么用?PHP Index::input使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Index
的用法示例。
在下文中一共展示了Index::input方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setup
/**
* 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;
}