PHP Class PMA\libraries\VersionInformation

Mostra file Open project: phpmyadmin/phpmyadmin Class Usage Examples

Public Methods

Method Description
evaluateVersionCondition ( string $type, string $condition ) : boolean Checks whether PHP or MySQL version meets supplied version condition
getLatestCompatibleVersion ( array $releases ) : array Returns the version and date of the latest phpMyAdmin version compatible with the available PHP and MySQL versions
getLatestVersion ( ) : object Returns information with latest version from phpmyadmin.net
versionToInt ( string $version ) : mixed Calculates numerical equivalent of phpMyAdmin version string

Protected Methods

Method Description
getMySQLVersion ( ) : string Returns the MySQL version
getPHPVersion ( ) : string Returns the PHP version

Method Details

evaluateVersionCondition() public method

Checks whether PHP or MySQL version meets supplied version condition
public evaluateVersionCondition ( string $type, string $condition ) : boolean
$type string PHP or MySQL
$condition string version condition
return boolean whether the condition is met

getLatestCompatibleVersion() public method

Returns the version and date of the latest phpMyAdmin version compatible with the available PHP and MySQL versions
public getLatestCompatibleVersion ( array $releases ) : array
$releases array array of information related to each version
return array containing the version and date of latest compatible version

getLatestVersion() public method

Returns information with latest version from phpmyadmin.net
public getLatestVersion ( ) : object
return object JSON decoded object with the data

getMySQLVersion() protected method

Returns the MySQL version
protected getMySQLVersion ( ) : string
return string MySQL version

getPHPVersion() protected method

Returns the PHP version
protected getPHPVersion ( ) : string
return string PHP version

versionToInt() public method

Calculates numerical equivalent of phpMyAdmin version string
public versionToInt ( string $version ) : mixed
$version string version
return mixed false on failure, integer on success