This commit is contained in:
2021-02-09 11:13:43 +08:00
parent cee76c69c6
commit d0b7845cd7
+30
View File
@@ -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();
}
}