You are here

function getid3_get_version in getID3() 6

Same name and namespace in other branches
  1. 8 getid3.module \getid3_get_version()
  2. 5 getid3.module \getid3_get_version()
  3. 7 getid3.module \getid3_get_version()

Returns the version number of getID3() that's installed.

2 calls to getid3_get_version()
getid3_admin_settings_form in ./getid3.admin.inc
Administration settings for getID3().
getid3_requirements in ./getid3.install
Implementation of hook_requirements()

File

./getid3.module, line 102

Code

function getid3_get_version() {
  if (getid3_load(FALSE)) {
    $getid3 = new getID3();

    // 1.9 and newer has a version method.
    if (method_exists($getid3, 'version')) {
      return $getid3
        ->version();
    }

    // Older versions defined a constant.
    if (defined('GETID3_VERSION')) {
      return GETID3_VERSION;
    }
  }
  return NULL;
}