mirror of
https://github.com/friendica/friendica
synced 2025-04-27 11:10:12 +00:00
Move creation of Dice into Container class
This commit is contained in:
parent
610267a3ea
commit
37ffeb8121
7 changed files with 19 additions and 33 deletions
|
@ -21,9 +21,18 @@ use Psr\Log\LoggerInterface;
|
|||
*/
|
||||
class Container
|
||||
{
|
||||
public static function fromBasePath(string $basePath): self
|
||||
{
|
||||
$path = $basePath . '/static/dependencies.config.php';
|
||||
|
||||
$dice = (new Dice())->addRules(require($path));
|
||||
|
||||
return static::fromDice($dice);
|
||||
}
|
||||
|
||||
private Dice $container;
|
||||
|
||||
protected function __construct(Dice $container)
|
||||
private function __construct(Dice $container)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue