mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 00:04:27 +02: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);
|
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
Add a link
Reference in a new issue