PHP Class PMA\libraries\StorageEngine

ファイルを表示 Open project: phpmyadmin/phpmyadmin Class Usage Examples

Public Properties

Property Type Description
$comment engine lang description
$engine engine name
$support engine supported by current server
$title engine title/description

Public Methods

Method Description
__construct ( string $engine ) Constructor
getComment ( ) : string Fetches the server's comment about this engine
getEngine ( string $engine ) : StorageEngine Loads the corresponding engine plugin, if available.
getHtmlSelect ( string $name = 'engine', string $id = null, string $selected = null, boolean $offerUnavailableEngines = false, boolean $addEmpty = false ) : string Returns HTML code for storage engine select box
getHtmlVariables ( ) : string Returns as HTML table of the engine's server variables
getInfoPages ( ) : string[] Returns a list of available information pages with labels
getMysqlHelpPage ( ) : string Returns string with filename for the MySQL helppage about this storage engine
getPage ( string $id ) : string Generates the requested information page
getStorageEngines ( ) : string[] Returns array of storage engines
getSupportInformationMessage ( ) : string Information message on whether this storage engine is supported
getTitle ( ) : string Reveals the engine's title
getVariables ( ) : array Generates a list of MySQL variables that provide information about this engine. This function should be overridden when extending this class for a particular engine.
getVariablesLikePattern ( ) : string Returns the pattern to be used in the query for SQL variables related to the storage engine
getVariablesStatus ( ) : array Returns array with detailed info about engine specific server variables
isValid ( string $engine ) : boolean Returns true if given engine name is supported/valid, otherwise false
resolveTypeSize ( integer $value ) : string Returns the engine specific handling for PMA_ENGINE_DETAILS_TYPE_SIZE type variables.

Method Details

__construct() public method

Constructor
public __construct ( string $engine )
$engine string The engine ID

getComment() public method

Fetches the server's comment about this engine
public getComment ( ) : string
return string The comment

getEngine() public static method

Loads the corresponding engine plugin, if available.
public static getEngine ( string $engine ) : StorageEngine
$engine string The engine ID
return StorageEngine The engine plugin

getHtmlSelect() public static method

Returns HTML code for storage engine select box
public static getHtmlSelect ( string $name = 'engine', string $id = null, string $selected = null, boolean $offerUnavailableEngines = false, boolean $addEmpty = false ) : string
$name string The name of the select form element
$id string The ID of the form field
$selected string The selected engine
$offerUnavailableEngines boolean Should unavailable storage engines be offered?
$addEmpty boolean Whether to provide empty option
return string html selectbox

getHtmlVariables() public method

Returns as HTML table of the engine's server variables
public getHtmlVariables ( ) : string
return string The table that was generated based on the retrieved information

getInfoPages() public method

Returns a list of available information pages with labels
public getInfoPages ( ) : string[]
return string[] The list

getMysqlHelpPage() public method

Returns string with filename for the MySQL helppage about this storage engine
public getMysqlHelpPage ( ) : string
return string MySQL help page filename

getPage() public method

Generates the requested information page
public getPage ( string $id ) : string
$id string page id
return string html output

getStorageEngines() public static method

Returns array of storage engines
public static getStorageEngines ( ) : string[]
return string[] array of storage engines

getSupportInformationMessage() public method

Information message on whether this storage engine is supported
public getSupportInformationMessage ( ) : string
return string The localized message.

getTitle() public method

Reveals the engine's title
public getTitle ( ) : string
return string The title

getVariables() public method

Generates a list of MySQL variables that provide information about this engine. This function should be overridden when extending this class for a particular engine.
public getVariables ( ) : array
return array The list of variables.

getVariablesLikePattern() public method

Returns the pattern to be used in the query for SQL variables related to the storage engine
public getVariablesLikePattern ( ) : string
return string SQL query LIKE pattern

getVariablesStatus() public method

Returns array with detailed info about engine specific server variables
public getVariablesStatus ( ) : array
return array array with detailed info about specific engine server variables

isValid() public static method

Returns true if given engine name is supported/valid, otherwise false
public static isValid ( string $engine ) : boolean
$engine string name of engine
return boolean whether $engine is valid or not

resolveTypeSize() public method

This function should be overridden when PMA_ENGINE_DETAILS_TYPE_SIZE type needs to be handled differently for a particular engine.
public resolveTypeSize ( integer $value ) : string
$value integer Value to format
return string the formatted value and its unit

Property Details

$comment public_oe property

engine lang description
public $comment

$engine public_oe property

engine name
public $engine

$support public_oe property

engine supported by current server
public $support

$title public_oe property

engine title/description
public $title