You are here

function lingotek_auto_loader in Lingotek Translation 7.2

Same name and namespace in other branches
  1. 7.7 lingotek.module \lingotek_auto_loader()
  2. 7.3 lingotek.module \lingotek_auto_loader()
  3. 7.4 lingotek.module \lingotek_auto_loader()
  4. 7.5 lingotek.module \lingotek_auto_loader()
  5. 7.6 lingotek.module \lingotek_auto_loader()

Auto-loader function used for upgrades

Parameters

type $class:

3 string references to 'lingotek_auto_loader'
lingotek_update_7209 in ./lingotek.install
Extend languages table to have lingotek_enabled field
lingotek_update_7210 in ./lingotek.install
Extend languages table to have lingotek_locale field
lingotek_update_7211 in ./lingotek.install
Upgrade lingotek table entries from drupal_codes to lingotek_locales

File

./lingotek.module, line 20

Code

function lingotek_auto_loader($class) {
  $module_location = drupal_get_path('module', 'lingotek');
  $paths = array(
    $module_location,
    $module_location . '/lib/Drupal/lingotek/',
  );
  foreach ($paths as $path) {
    $filename = $path . $class . '.php';
    if (file_exists($filename)) {
      include $filename;
    }
  }
}