diff --git a/app/Core/Settings/SettingsRepository.php b/app/Core/Settings/SettingsRepository.php index 24ed03d..4e4a358 100644 --- a/app/Core/Settings/SettingsRepository.php +++ b/app/Core/Settings/SettingsRepository.php @@ -4,14 +4,23 @@ namespace App\Core\Settings; +use Dibi\Connection; use Drago\Attr\AttributeDetectionException; -use Drago\Attr\From; +use Drago\Attr\Table; use Drago\Database\Database; -#[From(SettingsEntity::Table)] -class SettingsRepository extends Database +#[Table(SettingsEntity::Table)] +class SettingsRepository { + use Database; + + public function __construct( + protected Connection $connection, + ) { + } + + /** * @throws AttributeDetectionException */ diff --git a/app/Core/User/UserRepository.php b/app/Core/User/UserRepository.php index 377ebbe..ab30641 100644 --- a/app/Core/User/UserRepository.php +++ b/app/Core/User/UserRepository.php @@ -7,7 +7,7 @@ use Dibi\Connection; use Dibi\Exception; use Drago\Attr\AttributeDetectionException; -use Drago\Attr\From; +use Drago\Attr\Table; use Drago\Authorization\Conf; use Drago\Authorization\Control\Access\AccessRolesViewEntity; use Drago\Authorization\Tracy\PanelCookie; @@ -20,15 +20,16 @@ use Nette\Security\SimpleIdentity; -#[From(UsersEntity::Table, UsersEntity::PrimaryKey, class: UsersEntity::class)] -class UserRepository extends Database implements Authenticator, IdentityHandler +#[Table(UsersEntity::Table, UsersEntity::PrimaryKey, class: UsersEntity::class)] +class UserRepository implements Authenticator, IdentityHandler { + use Database; + public function __construct( - protected Connection $db, + protected Connection $connection, private readonly Passwords $password, private readonly PanelCookie $panelCookie, ) { - parent::__construct($db); }