mirror of
https://github.com/friendica/friendica
synced 2025-02-14 15:34:11 +00:00
Let event classes extending Event
This commit is contained in:
parent
4cbee618d6
commit
5b28b3d28f
3 changed files with 7 additions and 19 deletions
|
@ -16,23 +16,17 @@ use Friendica\Core\Config\Util\ConfigFileManager;
|
|||
*
|
||||
* @internal
|
||||
*/
|
||||
final class ConfigLoadedEvent implements NamedEvent
|
||||
final class ConfigLoadedEvent extends Event
|
||||
{
|
||||
public const CONFIG_LOADED = 'friendica.config_loaded';
|
||||
|
||||
private string $name;
|
||||
|
||||
private ConfigFileManager $config;
|
||||
|
||||
public function __construct(string $name, ConfigFileManager $config)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->config = $config;
|
||||
}
|
||||
parent::__construct($name);
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
public function getConfig(): ConfigFileManager
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Friendica\Event;
|
|||
*
|
||||
* @internal
|
||||
*/
|
||||
final class Event implements NamedEvent
|
||||
class Event implements NamedEvent
|
||||
{
|
||||
/**
|
||||
* Friendica is initialized.
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Friendica\Event;
|
|||
*
|
||||
* @internal
|
||||
*/
|
||||
final class HtmlFilterEvent implements NamedEvent
|
||||
final class HtmlFilterEvent extends Event
|
||||
{
|
||||
public const HEAD = 'friendica.html.head';
|
||||
|
||||
|
@ -24,19 +24,13 @@ final class HtmlFilterEvent implements NamedEvent
|
|||
|
||||
public const PAGE_END = 'friendica.html.page_end';
|
||||
|
||||
private string $name;
|
||||
|
||||
private string $html;
|
||||
|
||||
public function __construct(string $name, string $html)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->html = $html;
|
||||
}
|
||||
parent::__construct($name);
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
$this->html = $html;
|
||||
}
|
||||
|
||||
public function getHtml(): string
|
||||
|
|
Loading…
Add table
Reference in a new issue