/**
* Registers this instance as an autoloader.
*
- * @param Boolean $prepend Whether to prepend the autoloader or not
+ * @param bool $prepend
+ * Whether to prepend the autoloader or not.
*
* @api
*/
$include_paths = array(
'.',
$civicrm_base_path,
- $packages_path
+ $packages_path,
);
$include_paths = implode(PATH_SEPARATOR, $include_paths);
set_include_path($include_paths . PATH_SEPARATOR . get_include_path());
$file = strtr($class, '_', '/') . '.php';
// There is some question about the best way to do this.
// "require_once" is nice because it's simple and throws
- // intelligible errors. The down side is that autoloaders
- // down the chain cannot try to find the file if we fail.
- require_once ($file);
+ // intelligible errors.
+ if (FALSE != stream_resolve_include_path($file)) {
+ require_once $file;
+ }
}
}
+
}