2022-01-09 13:57:10 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace Kiri\Events;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
class Struct
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public string $event;
|
|
|
|
|
|
2022-06-16 18:13:27 +08:00
|
|
|
public array|\Closure|string $listener;
|
2022-01-09 13:57:10 +08:00
|
|
|
|
|
|
|
|
public int $priority;
|
|
|
|
|
|
2023-10-24 17:22:30 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $event
|
|
|
|
|
* @param array|\Closure|string $listener
|
|
|
|
|
* @param int $priority
|
|
|
|
|
*/
|
2022-06-16 18:13:27 +08:00
|
|
|
public function __construct(string $event, array|\Closure|string $listener, int $priority)
|
2022-01-09 13:57:10 +08:00
|
|
|
{
|
|
|
|
|
$this->event = $event;
|
|
|
|
|
$this->listener = $listener;
|
|
|
|
|
$this->priority = $priority;
|
|
|
|
|
}
|
|
|
|
|
}
|