This commit is contained in:
2020-09-14 02:42:10 +08:00
parent 053c449f85
commit 1f043c56bd
2 changed files with 15 additions and 1 deletions
+14
View File
@@ -14,4 +14,18 @@ abstract class Listener extends Component implements IListener
protected $trigger = '';
/**
* @return string
* @throws \Exception
*/
public function getName()
{
if (empty($this->trigger)) {
throw new \Exception('Listener name con\'t empty.');
}
return $this->trigger;
}
}