This commit is contained in:
2021-03-05 16:57:12 +08:00
parent 2fedf6dd88
commit 4c49bbbdd0
5 changed files with 24 additions and 7 deletions
+16
View File
@@ -9,6 +9,7 @@ use HttpServer\Http\HttpParams;
use HttpServer\Http\Request;
use HttpServer\Http\Response;
use HttpServer\Route\Router;
use JetBrains\PhpStorm\Pure;
use Snowflake\Error\Logger;
use Snowflake\Exception\ComponentException;
use Snowflake\Exception\NotFindClassException;
@@ -119,6 +120,21 @@ if (!function_exists('recursive_directory')) {
}
if (!function_exists('directory')) {
/**
* @param $name
* @return string
*/
#[Pure] function directory($name): string
{
return realpath(APP_PATH . $name);
}
}
if (!function_exists('isUrl')) {