Skip to content

Commit

Permalink
add change
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayIterator committed Oct 21, 2023
1 parent 7ac645d commit 9054a84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Languages/users-module.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 ""
9 changes: 5 additions & 4 deletions Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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';

/**
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 9054a84

Please sign in to comment.