PMA\libraries\Table::isEngine PHP Method

isEngine() public method

Checks the storage engine used to create table
public isEngine ( $engine ) : boolean
return boolean True, if $engine matches the storage engine for the table, False otherwise.
    public function isEngine($engine)
    {
        $tbl_storage_engine = strtoupper($this->getStatusInfo('ENGINE', null, true));
        if (is_array($engine)) {
            foreach ($engine as $e) {
                if ($e == $tbl_storage_engine) {
                    return true;
                }
            }
            return false;
        } else {
            return $tbl_storage_engine == $engine;
        }
    }

Usage Example

Example #1
0
require 'libraries/tbl_common.inc.php';
$url_query .= '&goto=tbl_operations.php&back=tbl_operations.php';
$url_params['goto'] = $url_params['back'] = 'tbl_operations.php';
/**
 * Gets relation settings
 */
$cfgRelation = PMA_getRelationsParam();
// reselect current db (needed in some cases probably due to
// the calling of relation.lib.php)
$GLOBALS['dbi']->selectDb($GLOBALS['db']);
/**
 * Gets tables information
 */
require 'libraries/tbl_info.inc.php';
// set initial value of these variables, based on the current table engine
if ($pma_table->isEngine('ARIA')) {
    // the value for transactional can be implicit
    // (no create option found, in this case it means 1)
    // or explicit (option found with a value of 0 or 1)
    // ($create_options['transactional'] may have been set by libraries/tbl_info.inc.php,
    // from the $create_options)
    $create_options['transactional'] = isset($create_options['transactional']) && $create_options['transactional'] == '0' ? '0' : '1';
    $create_options['page_checksum'] = isset($create_options['page_checksum']) ? $create_options['page_checksum'] : '';
}
$reread_info = false;
$table_alters = array();
/**
 * If the table has to be moved to some other database
 */
if (isset($_REQUEST['submit_move']) || isset($_REQUEST['submit_copy'])) {
    //$_message = '';
All Usage Examples Of PMA\libraries\Table::isEngine