本文整理匯總了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;
}