Skip to content

Commit 1586d51

Browse files
committed
docs: fix the annotation of Enforcer facade, fix #19
1 parent dab3c1d commit 1586d51

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/facade/Enforcer.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@
99
* @see \Casbin\Enforcer
1010
* @package tauthz\facade
1111
* @mixin \Casbin\Enforcer
12-
* @method mixed enforce(string $subject,string $object,string $action) static 权限检查
13-
* @method mixed addPolicy(string $subject,string $object,string $action) static 当前策略添加授权规则
14-
* @method mixed hasPolicy(string $subject,string $object,string $action) static 确定是否存在授权规则
15-
* @method mixed removePolicy(string $subject,string $object,string $action) static 当前策略移除授权规则
16-
* @method mixed getRolesForUser(string $username) static 获取用户具有的角色
17-
* @method mixed getUsersForRole(string $role) static 获取具有角色的用户
18-
* @method mixed hasRoleForUser(string $username, string $role) static 确定用户是否具有角色
19-
* @method mixed addRoleForUser(string $username, string $role) static 为用户添加角色
20-
* @method mixed deleteRoleForUser(string $username, string $role) static 删除用户的角色
21-
* @method mixed deleteRolesForUser(string $username) static 删除用户的所有角色
12+
* @method mixed enforce(mixed ...$rvals) static 权限检查,输入参数通常是(sub, obj, act)
13+
* @method mixed addPolicy(mixed ...$params) static 当前策略添加授权规则
14+
* @method mixed hasPolicy(mixed ...$params) static 确定是否存在授权规则
15+
* @method mixed removePolicy(mixed ...$params) static 当前策略移除授权规则
16+
* @method mixed getRolesForUser(string $username, string ...$domain) static 获取用户具有的角色
17+
* @method mixed getUsersForRole(string $role, string ...$domain) static 获取具有角色的用户
18+
* @method mixed hasRoleForUser(string $username, string $role, string ...$domain) static 确定用户是否具有角色
19+
* @method mixed addRoleForUser(string $username, string $role, string ...$domain) static 为用户添加角色
20+
* @method mixed deleteRoleForUser(string $username, string $role, string ...$domain) static 删除用户的角色
21+
* @method mixed deleteRolesForUser(string $username, string ...$domain) static 删除用户的所有角色
2222
* @method mixed deleteUser(string $username) static 删除一个用户
2323
* @method mixed deleteRole(string $role) static 删除一个角色
24-
* @method mixed deletePermission(string $policy) static 删除权限
25-
* @method mixed addPermissionForUser(string $username,string $policy) static 为用户或角色添加权限
26-
* @method mixed deletePermissionForUser(string $username,string $policy) static 删除用户或角色的权限
24+
* @method mixed deletePermission(string ...$permission) static 删除权限
25+
* @method mixed addPermissionForUser(string $username, string ...$permission) static 为用户或角色添加权限
26+
* @method mixed deletePermissionForUser(string $username, string ...$permission) static 删除用户或角色的权限
2727
* @method mixed deletePermissionsForUser(string $username) static 删除用户或角色的权限
2828
* @method mixed getPermissionsForUser(string $username) static 获取用户或角色的权限
29-
* @method mixed hasPermissionForUser(string $username,string $policy) static 确定用户是否具有权限
30-
* @method mixed getImplicitRolesForUser(string $username) static 获取用户具有的隐式角色
31-
* @method mixed getImplicitPermissionsForUser(string $username) static 获取用户具有的隐式角色
29+
* @method mixed hasPermissionForUser(string $username, string ...$permission) static 确定用户是否具有权限
30+
* @method mixed getImplicitRolesForUser(string $username, string ...$domain) static 获取用户具有的隐式角色
31+
* @method mixed getImplicitPermissionsForUser(string $username, string ...$domain) static 获取用户具有的隐式权限
3232
*/
3333
class Enforcer extends Facade
3434
{

0 commit comments

Comments
 (0)