<?php
class Event
{
  protected $action;
  public $priority;
  public $arguments;

  public function __construct($action, $priority = 10)
  {
    $this->action = $action;
    $this->priority = $priority;
  }

  public function getAction(...$data)
  {
    return call_user_func($this->action, $data);
  }
}
