本文整理汇总了PHP中core_component::classmap方法的典型用法代码示例。如果您正苦于以下问题:PHP core_component::classmap方法的具体用法?PHP core_component::classmap怎么用?PHP core_component::classmap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core_component
的用法示例。
在下文中一共展示了core_component::classmap方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fill_classmap_cache
/**
* Find all classes that can be autoloaded including frankenstyle namespaces.
*/
protected static function fill_classmap_cache()
{
global $CFG;
self::$classmap = array();
self::load_classes('core', "{$CFG->dirroot}/lib/classes");
foreach (self::$subsystems as $subsystem => $fulldir) {
if (!$fulldir) {
continue;
}
self::load_classes('core_' . $subsystem, "{$fulldir}/classes");
}
foreach (self::$plugins as $plugintype => $plugins) {
foreach ($plugins as $pluginname => $fulldir) {
self::load_classes($plugintype . '_' . $pluginname, "{$fulldir}/classes");
}
}
// Note: Add extra deprecated legacy classes here as necessary.
self::$classmap['textlib'] = "{$CFG->dirroot}/lib/classes/text.php";
self::$classmap['collatorlib'] = "{$CFG->dirroot}/lib/classes/collator.php";
ksort(self::$classmap);
}
示例2: fill_classmap_cache
/**
* Find all classes that can be autoloaded including frankenstyle namespaces.
*/
protected static function fill_classmap_cache()
{
global $CFG;
self::$classmap = array();
self::load_classes('core', "{$CFG->dirroot}/lib/classes");
foreach (self::$subsystems as $subsystem => $fulldir) {
if (!$fulldir) {
continue;
}
self::load_classes('core_' . $subsystem, "{$fulldir}/classes");
}
foreach (self::$plugins as $plugintype => $plugins) {
foreach ($plugins as $pluginname => $fulldir) {
self::load_classes($plugintype . '_' . $pluginname, "{$fulldir}/classes");
}
}
ksort(self::$classmap);
}