new appraoch
This commit is contained in:
43
pancake/system/vendor/league/event/src/Event.php
vendored
Executable file
43
pancake/system/vendor/league/event/src/Event.php
vendored
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace League\Event;
|
||||
|
||||
class Event extends AbstractEvent
|
||||
{
|
||||
/**
|
||||
* The event name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param string $name
|
||||
*/
|
||||
public function __construct($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public static function named($name)
|
||||
{
|
||||
return new static($name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user