当前位置: 首页>>代码示例>>PHP>>正文


PHP PMA_StorageEngine::getEngine方法代码示例

本文整理汇总了PHP中PMA_StorageEngine::getEngine方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_StorageEngine::getEngine方法的具体用法?PHP PMA_StorageEngine::getEngine怎么用?PHP PMA_StorageEngine::getEngine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PMA_StorageEngine的用法示例。


在下文中一共展示了PMA_StorageEngine::getEngine方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: PMA_getHtmlForSpecifiedServerEngines

/**
 * setup HTML for a given Storage Engine
 *
 * @return string
 */
function PMA_getHtmlForSpecifiedServerEngines()
{
    /**
     * Displays details about a given Storage Engine
     */
    $html = '';
    $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
    $html .= '<h2>' . "\n" . PMA_Util::getImage('b_engine.png') . '    ' . htmlspecialchars($engine_plugin->getTitle()) . "\n" . '    ' . PMA_Util::showMySQLDocu($engine_plugin->getMysqlHelpPage()) . "\n" . '</h2>' . "\n\n";
    $html .= '<p>' . "\n" . '    <em>' . "\n" . '        ' . htmlspecialchars($engine_plugin->getComment()) . "\n" . '    </em>' . "\n" . '</p>' . "\n\n";
    $infoPages = $engine_plugin->getInfoPages();
    if (!empty($infoPages) && is_array($infoPages)) {
        $html .= '<p>' . "\n" . '    <strong>[</strong>' . "\n";
        if (empty($_REQUEST['page'])) {
            $html .= '    <strong>' . __('Variables') . '</strong>' . "\n";
        } else {
            $html .= '    <a href="server_engines.php' . PMA_URL_getCommon(array('engine' => $_REQUEST['engine'])) . '">' . __('Variables') . '</a>' . "\n";
        }
        foreach ($infoPages as $current => $label) {
            $html .= '    <strong>|</strong>' . "\n";
            if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
                $html .= '    <strong>' . $label . '</strong>' . "\n";
            } else {
                $html .= '    <a href="server_engines.php' . PMA_URL_getCommon(array('engine' => $_REQUEST['engine'], 'page' => $current)) . '">' . htmlspecialchars($label) . '</a>' . "\n";
            }
        }
        unset($current, $label);
        $html .= '    <strong>]</strong>' . "\n" . '</p>' . "\n\n";
    }
    unset($infoPages, $page_output);
    if (!empty($_REQUEST['page'])) {
        $page_output = $engine_plugin->getPage($_REQUEST['page']);
    }
    if (!empty($page_output)) {
        $html .= $page_output;
    } else {
        $html .= '<p> ' . $engine_plugin->getSupportInformationMessage() . "\n" . '</p>' . "\n" . $engine_plugin->getHtmlVariables();
    }
    return $html;
}
开发者ID:nervo,项目名称:phpmyadmin,代码行数:44,代码来源:server_engines.lib.php

示例2: PMA_getPossibleRowFormat

/**
 * Get array of possible row formats
 *
 * @return array $possible_row_formats
 */
function PMA_getPossibleRowFormat()
{
    // the outer array is for engines, the inner array contains the dropdown
    // option values as keys then the dropdown option labels
    $possible_row_formats = array('ARIA' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC', 'PAGE' => 'PAGE'), 'MARIA' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC', 'PAGE' => 'PAGE'), 'MYISAM' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC'), 'PBXT' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC'), 'INNODB' => array('COMPACT' => 'COMPACT', 'REDUNDANT' => 'REDUNDANT'));
    /** @var PMA_StorageEngine_Innodb $innodbEnginePlugin */
    $innodbEnginePlugin = PMA_StorageEngine::getEngine('innodb');
    $innodbPluginVersion = $innodbEnginePlugin->getInnodbPluginVersion();
    if (!empty($innodbPluginVersion)) {
        $innodb_file_format = $innodbEnginePlugin->getInnodbFileFormat();
    } else {
        $innodb_file_format = '';
    }
    if ('Barracuda' == $innodb_file_format && $innodbEnginePlugin->supportsFilePerTable()) {
        $possible_row_formats['INNODB']['DYNAMIC'] = 'DYNAMIC';
        $possible_row_formats['INNODB']['COMPRESSED'] = 'COMPRESSED';
    }
    return $possible_row_formats;
}
开发者ID:mi-squared,项目名称:openemr,代码行数:24,代码来源:operations.lib.php

示例3: htmlspecialchars

           . '        </a></td>' . "\n"
           . '    <td>' . htmlspecialchars($details['Comment']) . '</td>' . "\n"
           . '</tr>' . "\n";
        $odd_row = !$odd_row;
    }
    unset($odd_row, $engine, $details);
    echo '</tbody>' . "\n"
       . '</table>' . "\n";

} else {

    /**
     * Displays details about a given Storage Engine
     */

    $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
    echo '<h2>' . "\n"
       . ($GLOBALS['cfg']['MainPageIconic']
            ? '<img class="icon" src="' . $pmaThemeImage . 'b_engine.png"'
                .' width="16" height="16" alt="" />' : '')
       . '    ' . htmlspecialchars($engine_plugin->getTitle()) . "\n"
       . '    ' . PMA_showMySQLDocu('', $engine_plugin->getMysqlHelpPage()) . "\n"
       . '</h2>' . "\n\n";
    echo '<p>' . "\n"
       . '    <em>' . "\n"
       . '        ' . htmlspecialchars($engine_plugin->getComment()) . "\n"
       . '    </em>' . "\n"
       . '</p>' . "\n\n";
    $infoPages = $engine_plugin->getInfoPages();
    if (!empty($infoPages) && is_array($infoPages)) {
        echo '<p>' . "\n"
开发者ID:blumenbach,项目名称:blumenbach-online.de,代码行数:31,代码来源:server_engines.php

示例4: array

if (isset($auto_increment) && strlen($auto_increment) > 0 && ($is_myisam_or_maria || $is_innodb || $is_pbxt)) {
    ?>
    <tr><td><label for="auto_increment_opt">AUTO_INCREMENT</label></td>
        <td><input type="text" name="new_auto_increment" id="auto_increment_opt"
                value="<?php 
    echo $auto_increment;
    ?>
" /></td>
    </tr>
    <?php 
}
// end if (MYISAM|INNODB)
// the outer array is for engines, the inner array contains the dropdown
// option values as keys then the dropdown option labels
$possible_row_formats = array('MARIA' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC', 'PAGE' => 'PAGE'), 'MYISAM' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC'), 'PBXT' => array('FIXED' => 'FIXED', 'DYNAMIC' => 'DYNAMIC'), 'INNODB' => array('COMPACT' => 'COMPACT', 'REDUNDANT' => 'REDUNDANT'));
$innodb_engine_plugin = PMA_StorageEngine::getEngine('innodb');
$innodb_plugin_version = $innodb_engine_plugin->getInnodbPluginVersion();
if (!empty($innodb_plugin_version)) {
    $innodb_file_format = $innodb_engine_plugin->getInnodbFileFormat();
} else {
    $innodb_file_format = '';
}
if ('Barracuda' == $innodb_file_format && $innodb_engine_plugin->supportsFilePerTable()) {
    $possible_row_formats['INNODB']['DYNAMIC'] = 'DYNAMIC';
    $possible_row_formats['INNODB']['COMPRESSED'] = 'COMPRESSED';
}
unset($innodb_engine_plugin, $innodb_plugin_version, $innodb_file_format);
// for MYISAM there is also COMPRESSED but it can be set only by the
// myisampack utility, so don't offer here the choice because if we
// try it inside an ALTER TABLE, MySQL (at least in 5.1.23-maria)
// does not return a warning
开发者ID:kebyn,项目名称:apache_workspace,代码行数:31,代码来源:tbl_operations.php

示例5: testGetEngine

 /**
  * Test for PMA_StorageEngine::getEngine
  *
  * @param string $expectedClass Class that should be selected
  * @param string $engineName    Engine name
  *
  * @return void
  *
  * @dataProvider providerGetEngine
  */
 public function testGetEngine($expectedClass, $engineName)
 {
     $this->assertInstanceOf($expectedClass, PMA_StorageEngine::getEngine($engineName));
 }
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:14,代码来源:PMA_server_engines_test.php

示例6: testPMAGetHtmlForSpecifiedServerEngines

 /**
  * Test for PMA_getHtmlForSpecifiedServerEngines
  *
  * @return void
  */
 public function testPMAGetHtmlForSpecifiedServerEngines()
 {
     $_REQUEST['engine'] = "pbxt";
     $_REQUEST['page'] = "page";
     //Mock DBI
     $dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
     $GLOBALS['dbi'] = $dbi;
     //test PMA_getHtmlForSpecifiedServerEngines
     $html = PMA_getHtmlForSpecifiedServerEngines();
     $engine_plugin = PMA_StorageEngine::getEngine($_REQUEST['engine']);
     //validate 1: Engine title
     $this->assertContains(htmlspecialchars($engine_plugin->getTitle()), $html);
     //validate 2: Engine Mysql Help Page
     $this->assertContains(PMA_Util::showMySQLDocu($engine_plugin->getMysqlHelpPage()), $html);
     //validate 3: Engine Comment
     $this->assertContains(htmlspecialchars($engine_plugin->getComment()), $html);
     //validate 4: Engine Info Pages
     $this->assertContains(__('Variables'), $html);
     $this->assertContains(PMA_URL_getCommon(array('engine' => $_REQUEST['engine'], 'page' => "Documentation")), $html);
     //validate 5: other items
     $this->assertContains(PMA_URL_getCommon(array('engine' => $_REQUEST['engine'])), $html);
     $this->assertContains($engine_plugin->getSupportInformationMessage(), $html);
     $this->assertContains($engine_plugin->getHtmlVariables(), $html);
 }
开发者ID:kfjihailong,项目名称:phpMyAdmin,代码行数:29,代码来源:PMA_server_engines_test.php

示例7: PMA_generate_common_url

    $common_url = './server_engines.php?' . PMA_generate_common_url() . '&amp;engine=';
    foreach ($mysql_storage_engines as $engine => $details) {
        echo '        <tr' . ($details['Support'] == 'NO' || $details['Support'] == 'DISABLED' ? ' class="disabled"' : '') . '>' . "\n" . '            <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n" . '                <a href="' . $common_url . $engine . '">' . "\n" . '                    ' . htmlspecialchars($details['Engine']) . "\n" . '                </a>' . "\n" . '            </td>' . "\n";
        if (PMA_MYSQL_INT_VERSION >= 40102) {
            echo '            <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n" . '                ' . htmlspecialchars($details['Comment']) . "\n" . '            </td>' . "\n";
        }
        echo '        </tr>' . "\n";
        $useBgcolorOne = !$useBgcolorOne;
    }
    unset($useBgcolorOne, $common_url, $engine, $details);
    echo '    </tbody>' . "\n" . '</table>' . "\n";
} else {
    /**
     * Displays details about a given Storage Engine
     */
    $engine_plugin = PMA_StorageEngine::getEngine($engine);
    echo '<h2>' . "\n" . ($cfg['MainPageIconic'] ? '<img src="' . $pmaThemeImage . 'b_engine.png" width="16" height="16" border="0" hspace="2" align="middle" />' : '') . '    ' . htmlspecialchars($engine_plugin->getTitle()) . "\n" . '</h2>' . "\n\n";
    if (PMA_MYSQL_INT_VERSION >= 40102) {
        echo '<p>' . "\n" . '    <i>' . "\n" . '        ' . htmlspecialchars($engine_plugin->getComment()) . "\n" . '    </i>' . "\n" . '</p>' . "\n\n";
    }
    $infoPages = $engine_plugin->getInfoPages();
    if (!empty($infoPages) && is_array($infoPages)) {
        $common_url = './server_engines.php?' . PMA_generate_common_url() . '&amp;engine=' . urlencode($engine);
        echo '<p>' . "\n" . '    <b>[</b>' . "\n";
        if (empty($page)) {
            echo '    <b>' . $strServerTabVariables . '</b>' . "\n";
        } else {
            echo '    <a href="' . $common_url . '">' . $strServerTabVariables . '</a>' . "\n";
        }
        foreach ($infoPages as $current => $label) {
            echo '    <b>|</b>' . "\n";
开发者ID:mike503,项目名称:phpmyadmin,代码行数:31,代码来源:server_engines.php


注:本文中的PMA_StorageEngine::getEngine方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。