1. Go to this page and download the library: Download illusiard/yii2-entity-acl library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
illusiard / yii2-entity-acl example snippets
interface SubjectResolverInterface
{
/** @return int|string|list<int|string>|null */
public function resolveGroupId(int|string $userId, array $context = []): int|string|array|null;
public function resolveOwnerId(AccessRequest $req): int|string|null;
}
interface ConditionHandlerInterface
{
public function supports(string $type): bool;
public function evaluate(array $payload, AccessRequest $req, ConditionEngine $engine): bool;
}