改名
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
defined('APP_PATH') or define('APP_PATH', __DIR__ . '/../../');
|
||||
|
||||
use Annotation\Annotation;
|
||||
use HttpServer\Http\HttpParams;
|
||||
use HttpServer\Http\Request;
|
||||
use HttpServer\Http\Response;
|
||||
@@ -38,6 +39,22 @@ if (!function_exists('make')) {
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('annotation')) {
|
||||
|
||||
|
||||
/**
|
||||
* @return Annotation
|
||||
* @throws ComponentException
|
||||
*/
|
||||
function annotation(): Annotation
|
||||
{
|
||||
return Snowflake::app()->getAttributes();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('isUrl')) {
|
||||
|
||||
|
||||
@@ -395,6 +412,26 @@ if (!function_exists('storage')) {
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('listen')) {
|
||||
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @param $callback
|
||||
* @param $params
|
||||
* @param $isAppend
|
||||
* @throws ComponentException
|
||||
* @throws Exception
|
||||
*/
|
||||
function listen($name, $callback, $params = [], $isAppend = true)
|
||||
{
|
||||
$event = Snowflake::app()->getEvent();
|
||||
$event->on($name, $callback, $params, $isAppend);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('alias')) {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user