From 9054a84060ea2d938d929ed4da0342df3bc37f04 Mon Sep 17 00:00:00 2001 From: ArrayIterator Date: Sun, 22 Oct 2023 02:44:04 +0700 Subject: [PATCH] add change --- Languages/users-module.pot | 6 +++--- Users.php | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Languages/users-module.pot b/Languages/users-module.pot index 01ca378..09bb5ac 100644 --- a/Languages/users-module.pot +++ b/Languages/users-module.pot @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: TrayDigita Users Module 1.0.0\n" -"POT-Creation-Date: 2023-10-16 01:36+0700\n" +"POT-Creation-Date: 2023-10-22 02:41+0700\n" "PO-Revision-Date: 2023-09-24 19:00+0700\n" "Last-Translator: ArrayAccess\n" "Language-Team: ArrayAccess\n" @@ -25,12 +25,12 @@ msgstr "" "X-Poedit-SearchPathExcluded-1: *.html\n" "X-Poedit-SearchPathExcluded-2: *.json\n" -#: Users.php:95 +#: Users.php:96 msgctxt "module" msgid "Users & Auth" msgstr "" -#: Users.php:104 +#: Users.php:105 msgctxt "module" msgid "Core module that support users & authentication" msgstr "" diff --git a/Users.php b/Users.php index 80e7c8b..b42f10f 100644 --- a/Users.php +++ b/Users.php @@ -11,7 +11,7 @@ use ArrayAccess\TrayDigita\Auth\Cookie\UserAuth; use ArrayAccess\TrayDigita\Auth\Roles\Interfaces\PermissionInterface; use ArrayAccess\TrayDigita\Collection\Config; -use ArrayAccess\TrayDigita\Container\Container; +use ArrayAccess\TrayDigita\Container\Interfaces\SystemContainerInterface; use ArrayAccess\TrayDigita\Database\Connection; use ArrayAccess\TrayDigita\Database\Entities\Abstracts\AbstractUser; use ArrayAccess\TrayDigita\Database\Entities\Interfaces\CapabilityEntityFactoryInterface; @@ -46,11 +46,12 @@ use const PHP_INT_MIN; /** - * @method Container getContainer() + * @method SystemContainerInterface getContainer() */ final class Users extends AbstractModule { use TranslatorTrait; + protected string $name = 'Users & Auth'; /** @@ -224,7 +225,7 @@ private function doResolvePermission(): self $container, $manager ); - if ($container instanceof Container) { + if ($container instanceof SystemContainerInterface) { $container->set(PermissionInterface::class, $permission); } else { $container->set(PermissionInterface::class, fn () => $permission); @@ -386,7 +387,7 @@ private function createEntityFactoryContainer(): self if ($hasUserEntity && $hasAdminEntity) { return $this; } - if ($container instanceof Container) { + if ($container instanceof SystemContainerInterface) { if (!$hasUserEntity) { $container->set(UserEntityFactory::class, UserEntityFactory::class); }