改名
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
namespace Annotation;
|
||||||
|
|
||||||
|
|
||||||
|
use Snowflake\Exception\ComponentException;
|
||||||
|
use Snowflake\Snowflake;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Event
|
||||||
|
* @package Annotation
|
||||||
|
*/
|
||||||
|
#[\Attribute(\Attribute::TARGET_METHOD)] class Event
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event constructor.
|
||||||
|
* @param string $name
|
||||||
|
* @param array $params
|
||||||
|
* @throws ComponentException
|
||||||
|
*/
|
||||||
|
public function __construct(public string $name, public array $params = [])
|
||||||
|
{
|
||||||
|
$event = Snowflake::app()->getEvent();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user