改名
This commit is contained in:
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
|||||||
namespace Snowflake\Abstracts;
|
namespace Snowflake\Abstracts;
|
||||||
|
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Listener
|
* Class Listener
|
||||||
* @package Snowflake\Abstracts
|
* @package Snowflake\Abstracts
|
||||||
@@ -12,20 +14,5 @@ namespace Snowflake\Abstracts;
|
|||||||
abstract class Listener extends Component implements IListener
|
abstract class Listener extends Component implements IListener
|
||||||
{
|
{
|
||||||
|
|
||||||
protected string $trigger = '';
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
* @throws \Exception
|
|
||||||
*/
|
|
||||||
public function getName(): string
|
|
||||||
{
|
|
||||||
if (empty($this->trigger)) {
|
|
||||||
throw new \Exception('Listener name con\'t empty.');
|
|
||||||
}
|
|
||||||
return $this->trigger;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user