mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
Create DatabaseService to access all repositories
This commit is contained in:
parent
9cbf1e6982
commit
23d052c7fe
3 changed files with 39 additions and 2 deletions
28
src/Database/DatabaseService.php
Normal file
28
src/Database/DatabaseService.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
// Copyright (C) 2010-2024, the Friendica project
|
||||
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Friendica\Database;
|
||||
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\Repository\UserDeletedRepository;
|
||||
|
||||
final class DatabaseService
|
||||
{
|
||||
private Database $database;
|
||||
|
||||
public function __construct(Database $database)
|
||||
{
|
||||
$this->database = $database;
|
||||
}
|
||||
|
||||
public function getUserDeletedRepository(): UserDeletedRepository
|
||||
{
|
||||
return new UserDeletedRepository($this->database);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue