mirror of
https://github.com/friendica/friendica
synced 2025-02-14 15:34:11 +00:00
Create DI::eventDispatcher() where constructor injection is not possible atm
This commit is contained in:
parent
2a02f58886
commit
7e199f034b
1 changed files with 9 additions and 0 deletions
|
@ -789,4 +789,13 @@ abstract class DI
|
|||
{
|
||||
return self::$dice->create(Content\Post\Repository\PostMedia::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal The EventDispatcher should never called outside of the core, like in addons or themes
|
||||
* @deprecated 2025.02 Use constructor injection instead
|
||||
*/
|
||||
public static function eventDispatcher(): \Psr\EventDispatcher\EventDispatcherInterface
|
||||
{
|
||||
return self::$dice->create(\Psr\EventDispatcher\EventDispatcherInterface::class);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue