本文整理汇总了PHP中PMA_StorageEngine::getStorageEngines方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_StorageEngine::getStorageEngines方法的具体用法?PHP PMA_StorageEngine::getStorageEngines怎么用?PHP PMA_StorageEngine::getStorageEngines使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA_StorageEngine
的用法示例。
在下文中一共展示了PMA_StorageEngine::getStorageEngines方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_getHtmlForAllServerEngines
/**
* setup HTML for server all Engines information
*
* @return string
*/
function PMA_getHtmlForAllServerEngines()
{
/**
* Displays the table header
*/
$html = '<table class="noclick">' . "\n" . '<thead>' . "\n" . '<tr><th>' . __('Storage Engine') . '</th>' . "\n" . ' <th>' . __('Description') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>' . "\n";
/**
* Listing the storage engines
*/
$odd_row = true;
foreach (PMA_StorageEngine::getStorageEngines() as $engine => $details) {
$html .= '<tr class="' . ($odd_row ? 'odd' : 'even') . ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED' ? ' disabled' : '') . ($details['Support'] == 'DEFAULT' ? ' marked' : '') . '">' . "\n" . ' <td><a rel="newpage" href="server_engines.php' . PMA_URL_getCommon(array('engine' => $engine)) . '">' . "\n" . ' ' . htmlspecialchars($details['Engine']) . "\n" . ' </a></td>' . "\n" . ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n" . '</tr>' . "\n";
$odd_row = !$odd_row;
}
unset($odd_row, $engine, $details);
$html .= '</tbody>' . "\n" . '</table>' . "\n";
return $html;
}
示例2: __construct
/**
* Constructor
*
* @param string $engine The engine ID
*/
function __construct($engine)
{
$storage_engines = PMA_StorageEngine::getStorageEngines();
if (!empty($storage_engines[$engine])) {
$this->engine = $engine;
$this->title = $storage_engines[$engine]['Engine'];
$this->comment = isset($storage_engines[$engine]['Comment']) ? $storage_engines[$engine]['Comment'] : '';
switch ($storage_engines[$engine]['Support']) {
case 'DEFAULT':
$this->support = PMA_ENGINE_SUPPORT_DEFAULT;
break;
case 'YES':
$this->support = PMA_ENGINE_SUPPORT_YES;
break;
case 'DISABLED':
$this->support = PMA_ENGINE_SUPPORT_DISABLED;
break;
case 'NO':
default:
$this->support = PMA_ENGINE_SUPPORT_NO;
}
}
}
示例3: foreach
* Displays the table header
*/
echo '<table>' . "\n"
. '<thead>' . "\n"
. '<tr><th>' . $strStorageEngine . '</th>' . "\n"
. ' <th>' . $strDescription . '</th>' . "\n"
. '</tr>' . "\n"
. '</thead>' . "\n"
. '<tbody>' . "\n";
/**
* Listing the storage engines
*/
$odd_row = true;
foreach (PMA_StorageEngine::getStorageEngines() as $engine => $details) {
echo '<tr class="'
. ($odd_row ? 'odd' : 'even')
. ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED'
? ' disabled'
: '')
. '">' . "\n"
. ' <td><a href="./server_engines.php'
. PMA_generate_common_url(array('engine' => $engine)) . '">' . "\n"
. ' ' . htmlspecialchars($details['Engine']) . "\n"
. ' </a></td>' . "\n"
. ' <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
. '</tr>' . "\n";
$odd_row = !$odd_row;
}
unset($odd_row, $engine, $details);
示例4: isValid
/**
* Returns true if given engine name is supported/valid, otherwise false
*
* @param string $engine name of engine
*
* @static
* @return boolean whether $engine is valid or not
*/
public static function isValid($engine)
{
if ($engine == "PBMS") {
return true;
}
$storage_engines = PMA_StorageEngine::getStorageEngines();
return isset($storage_engines[$engine]);
}