本文整理汇总了PHP中Redaxscript\Db::getStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Db::getStatus方法的具体用法?PHP Db::getStatus怎么用?PHP Db::getStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Redaxscript\Db
的用法示例。
在下文中一共展示了Db::getStatus方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _database
/**
* install the database
*
* @since 3.0.0
*
* @return boolean
*/
protected function _database()
{
$installer = new Installer($this->_config);
$installer->init();
$installer->rawDrop();
return Db::getStatus() === 1;
}
示例2: testGetStatus
/**
* testGetStatus
*
* @since 2.4.0
*
*/
public function testGetStatus()
{
/* actual */
$actual = Db::getStatus();
/* compare */
$this->assertEquals(2, $actual);
}
示例3: _database
/**
* database status
*
* @since 3.0.0
*
* @return string
*/
protected function _database()
{
$status = Db::getStatus();
$wordingArray = $this->_commandArray['status']['argumentArray']['database']['wordingArray'];
if (array_key_exists($status, $wordingArray)) {
return $wordingArray[$status] . PHP_EOL;
}
}
示例4: _database
/**
* install the database
*
* @since 3.0.0
*
* @param array $optionArray
*
* @return boolean
*/
protected function _database($optionArray = [])
{
$adminName = $this->prompt('admin-name', $optionArray);
$adminUser = $this->prompt('admin-user', $optionArray);
$adminPassword = $this->prompt('admin-password', $optionArray);
$adminEmail = $this->prompt('admin-email', $optionArray);
if ($adminName && $adminUser && $adminPassword && $adminEmail) {
$installer = new Installer($this->_config);
$installer->init();
$installer->rawCreate();
$installer->insertData(['adminName' => $adminName, 'adminUser' => $adminUser, 'adminPassword' => $adminPassword, 'adminEmail' => $adminEmail]);
return Db::getStatus() === 2;
}
return false;
}
示例5: _install
/**
* install the database
*
* @since 3.0.0
*
* @param array $installArray
*
* @return array
*/
protected function _install($installArray = [])
{
$adminName = $installArray['adminName'];
$adminUser = $installArray['adminUser'];
$adminPassword = $installArray['adminPassword'];
$adminEmail = $installArray['adminEmail'];
if ($adminName && $adminUser && $adminPassword && $adminEmail) {
$installer = new Installer($this->_config);
$installer->init();
$installer->rawDrop();
$installer->rawCreate();
$installer->insertData(['adminName' => $installArray['adminName'], 'adminUser' => $installArray['adminUser'], 'adminPassword' => $installArray['adminPassword'], 'adminEmail' => $installArray['adminEmail']]);
return Db::getStatus() === 2;
}
return false;
}