This commit is contained in:
2020-09-11 15:01:22 +08:00
parent 48e2580c8f
commit 3bbd3e7c4e
6 changed files with 27 additions and 13 deletions
+16
View File
@@ -3,6 +3,8 @@
defined('APP_PATH') or define('APP_PATH', __DIR__ . '/../../');
use HttpServer\Http\Response;
use Snowflake\Error\Logger;
use Snowflake\Exception\ComponentException;
use Snowflake\Snowflake;
use HttpServer\Http\Context;
use Snowflake\Core\ArrayAccess;
@@ -45,6 +47,20 @@ if (!function_exists('exif_imagetype')) {
}
}
if (!function_exists('logger')) {
/**
* @return Logger
* @throws ComponentException
*/
function logger()
{
return Snowflake::app()->getLogger();
}
}
if (!function_exists('get_file_extension')) {
function get_file_extension($filename)