function lingotek_auto_loader in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lingotek.module \lingotek_auto_loader()
- 7.2 lingotek.module \lingotek_auto_loader()
- 7.3 lingotek.module \lingotek_auto_loader()
- 7.4 lingotek.module \lingotek_auto_loader()
- 7.5 lingotek.module \lingotek_auto_loader()
Auto-loader function used for upgrades
Parameters
type $class:
4 string references to 'lingotek_auto_loader'
- lingotek_install in ./
lingotek.install - Implements hook_install().
- 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 21
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;
}
}
}