You are here

function moopapi_get_major_version in Module Object Oriented Programming API 7.2

Same name and namespace in other branches
  1. 6.2 moopapi.module \moopapi_get_major_version()
  2. 6 moopapi.module \moopapi_get_major_version()
  3. 7 moopapi.module \moopapi_get_major_version()
1 call to moopapi_get_major_version()
ComponentFactory::get in component/moopapi.component.inc

File

./moopapi.module, line 220

Code

function moopapi_get_major_version() {
  static $moopapi_major_version;
  if (empty($moopapi_major_version)) {

    // Workaround to deal with unavailability of VERSION during bootstrap.
    // @see http://drupal.org/node/618938
    $moopapi_major_version = defined('VERSION') ? current(explode('.', VERSION)) : '6';
  }
  return $moopapi_major_version;
}