Files
kiri-core/Annotation/Event.php
T
2021-02-09 11:13:43 +08:00

31 lines
446 B
PHP

<?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();
}
}