function _crumbs_autoload in Crumbs, the Breadcrumbs suite 7.2
Same name and namespace in other branches
- 7 crumbs.module \_crumbs_autoload()
Crumbs autoloader.
Takes the class name, strips the "crumbs_" prefix, converts underscores to directory separators.
For example, crumbs_InjectedAPI_describeMonoPlugin will be loaded from lib/InjectedAPI/describeMonoPlugin.php.
Parameters
$class: The name of the class to load.
1 string reference to '_crumbs_autoload'
- crumbs.module in ./
crumbs.module - Provides an API for building breadcrumbs.
File
- ./
crumbs.module, line 38 - Provides an API for building breadcrumbs.
Code
function _crumbs_autoload($class) {
if (preg_match('#^crumbs_(.*)$#', $class, $m)) {
$path = strtr($m[1], '_', '/');
module_load_include('php', 'crumbs', "lib/{$path}");
}
}