|
|
@@ -44,15 +44,15 @@ class Autoloader
|
|
|
*/
|
|
|
public static function loadByNamespace($name)
|
|
|
{
|
|
|
- $class_path = \str_replace('\\', DIRECTORY_SEPARATOR, $name);
|
|
|
+ $class_path = \str_replace('\\', \DIRECTORY_SEPARATOR, $name);
|
|
|
if (\strpos($name, 'Workerman\\') === 0) {
|
|
|
$class_file = __DIR__ . \substr($class_path, \strlen('Workerman')) . '.php';
|
|
|
} else {
|
|
|
if (self::$_autoloadRootPath) {
|
|
|
- $class_file = self::$_autoloadRootPath . DIRECTORY_SEPARATOR . $class_path . '.php';
|
|
|
+ $class_file = self::$_autoloadRootPath . \DIRECTORY_SEPARATOR . $class_path . '.php';
|
|
|
}
|
|
|
if (empty($class_file) || !\is_file($class_file)) {
|
|
|
- $class_file = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . "$class_path.php";
|
|
|
+ $class_file = __DIR__ . \DIRECTORY_SEPARATOR . '..' . \DIRECTORY_SEPARATOR . "$class_path.php";
|
|
|
}
|
|
|
}
|
|
|
|