public static function Vars::api in Variable API 7.2
Same name and namespace in other branches
- 6.2 vars.module \Vars::api()
Verifies the current API version is included between two values passed as arguments.
Parameters
$minimum: The minimum API version required.
$maximum: The maximum version required. This argument is optional; the current API will be checked against this value only if it is passed to the function.
Return value
TRUE, if the current API version is included between the passed values.
File
- ./
vars.classes.inc, line 80 - Classes implemented by the Variable API module.
Class
- Vars
- @file Classes implemented by the Variable API module.
Code
public static function api($minimum, $maximum = NULL) {
if (version_compare(self::API_VERSION, $minimum, '<')) {
return FALSE;
}
if (isset($maximum) && version_compare(self::API_VERSION, $maximum, '>')) {
return FALSE;
}
return TRUE;
}