Returns the number of bytes when a formatted size is given
public static extractValueFromFormattedSize ( string $formatted_size ) : integer | ||
$formatted_size | string | the size expression (for example 8MB) |
return | integer | The numerical part of the expression (for example 8) |
/** * returns the pbxt engine specific handling for * PMA_ENGINE_DETAILS_TYPE_SIZE variables. * * @param string $formatted_size the size expression (for example 8MB) * * @return string the formatted value and its unit */ public function resolveTypeSize($formatted_size) { if (preg_match('/^[0-9]+[a-zA-Z]+$/', $formatted_size)) { $value = PMA\libraries\Util::extractValueFromFormattedSize($formatted_size); } else { $value = $formatted_size; } return PMA\libraries\Util::formatByteDown($value); }