Rename to AddonStartEvent

This commit is contained in:
Art4 2025-01-01 08:02:22 +00:00
parent 689ed4e5f2
commit 0740a41377
3 changed files with 6 additions and 6 deletions

View file

@ -9,7 +9,7 @@ declare(strict_types=1);
namespace Friendica\Addon;
use Friendica\Addon\Event\AddonStartedEvent;
use Friendica\Addon\Event\AddonStartEvent;
use Friendica\EventSubscriber\StaticEventSubscriber;
/**
@ -25,5 +25,5 @@ interface AddonBootstrap extends StaticEventSubscriber
/**
* Init of the addon.
*/
public static function initAddon(AddonStartedEvent $event): void;
public static function initAddon(AddonStartEvent $event): void;
}

View file

@ -12,7 +12,7 @@ namespace Friendica\Addon\Event;
/**
* Start an addon.
*/
final class AddonStartedEvent
final class AddonStartEvent
{
public function getDependencies(): array
{

View file

@ -16,7 +16,7 @@ declare(strict_types=1);
namespace FriendicaAddons\HelloAddon;
use Friendica\Addon\Event\AddonInstallEvent;
use Friendica\Addon\Event\AddonStartedEvent;
use Friendica\Addon\Event\AddonStartEvent;
use Friendica\Addon\Event\AddonUninstallEvent;
use Friendica\Event\HtmlFilterEvent;
use Psr\Log\LoggerInterface;
@ -32,7 +32,7 @@ class HelloAddon implements \Friendica\Addon\AddonBootstrap
*
* The array should contain FQCN of the required services.
*
* The dependencies will be passed to the initAddon() method via AddonStartedEvent::getDependencies().
* The dependencies will be passed to the initAddon() method via AddonStartEvent::getDependencies().
*/
public static function getRequiredDependencies(): array
{
@ -48,7 +48,7 @@ class HelloAddon implements \Friendica\Addon\AddonBootstrap
];
}
public static function initAddon(AddonStartedEvent $event): void
public static function initAddon(AddonStartEvent $event): void
{
// $dependencies containts an array of services defined in getRequiredDependencies().
// The keys are the FQCN of the services.