1 Star 0 Fork 31

lampboy/LinkCache

forked from 董楠/LinkCache 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
autoload_dev.php 693 Bytes
一键复制 编辑 原始数据 按行查看 历史
董楠 提交于 2015-10-27 13:11 . 调整测试文件命名空间
<?php
//自动加载类文件
spl_autoload_register(function($class) {
if (false !== strpos($class, '\\')) {
$name = strstr($class, '\\', true);
if ($name === 'linkcache') {
$filename = __DIR__ . '/' . 'src/' . str_replace('\\', '/', $class) . '.php';
if (file_exists($filename)) {
include $filename;
}
} elseif ($name === 'linkcacheTests') {
$class = str_replace('linkcacheTests\\', '', $class);
$filename = __DIR__ . '/' . 'tests/' . str_replace('\\', '/', $class) . '.php';
if (file_exists($filename)) {
include $filename;
}
}
}
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lampboy/LinkCache.git
git@gitee.com:lampboy/LinkCache.git
lampboy
LinkCache
LinkCache
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385