PocketMine-MP 5.11.1 git-db894e3a4a5bb9a80b3ac07ac91f58bdaf15176a
pocketmine\permission\PermissibleInternal Class Reference
+ Inheritance diagram for pocketmine\permission\PermissibleInternal:
+ Collaboration diagram for pocketmine\permission\PermissibleInternal:

Public Member Functions

 __construct (array $basePermissions)
 
 addAttachment (Plugin $plugin, ?string $name=null, ?bool $value=null)
 
 destroyCycles ()
 
 getEffectivePermissions ()
 
 getPermissionRecalculationCallbacks ()
 
 hasPermission (Permission|string $name)
 
 isPermissionSet (Permission|string $name)
 
 recalculatePermissions ()
 
 removeAttachment (PermissionAttachment $attachment)
 
 setBasePermission (Permission|string $name, bool $grant)
 
 unsetBasePermission (Permission|string $name)
 

Detailed Description

Definition at line 42 of file PermissibleInternal.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\permission\PermissibleInternal::__construct ( array  $basePermissions)
Parameters
bool[]$basePermissions@phpstan-param array<string, bool> $basePermissions

Definition at line 65 of file PermissibleInternal.php.

References pocketmine\permission\PermissibleInternal\recalculatePermissions().

+ Here is the call graph for this function:

Member Function Documentation

◆ addAttachment()

pocketmine\permission\PermissibleInternal::addAttachment ( Plugin  $plugin,
?string  $name = null,
?bool  $value = null 
)

//TODO: tick scheduled attachments

Implements pocketmine\permission\Permissible.

Definition at line 104 of file PermissibleInternal.php.

◆ destroyCycles()

pocketmine\permission\PermissibleInternal::destroyCycles ( )

Definition at line 215 of file PermissibleInternal.php.

◆ getEffectivePermissions()

pocketmine\permission\PermissibleInternal::getEffectivePermissions ( )

◆ getPermissionRecalculationCallbacks()

pocketmine\permission\PermissibleInternal::getPermissionRecalculationCallbacks ( )
Returns
\Closure[]|ObjectSet @phpstan-return ObjectSet<\Closure(array<string, bool> $changedPermissionsOldValues) : void>

Implements pocketmine\permission\Permissible.

Definition at line 206 of file PermissibleInternal.php.

◆ hasPermission()

pocketmine\permission\PermissibleInternal::hasPermission ( Permission|string  $name)

Returns the permission value if overridden, or the default value if not

Implements pocketmine\permission\Permissible.

Definition at line 89 of file PermissibleInternal.php.

◆ isPermissionSet()

pocketmine\permission\PermissibleInternal::isPermissionSet ( Permission|string  $name)

Checks if this instance has a permission overridden

Implements pocketmine\permission\Permissible.

Definition at line 85 of file PermissibleInternal.php.

◆ recalculatePermissions()

pocketmine\permission\PermissibleInternal::recalculatePermissions ( )
Returns
bool[] changed permission name => old value @phpstan-return array<string, bool>

Implements pocketmine\permission\Permissible.

Definition at line 133 of file PermissibleInternal.php.

Referenced by pocketmine\permission\PermissibleInternal\__construct().

+ Here is the caller graph for this function:

◆ removeAttachment()

pocketmine\permission\PermissibleInternal::removeAttachment ( PermissionAttachment  $attachment)

Implements pocketmine\permission\Permissible.

Definition at line 122 of file PermissibleInternal.php.

◆ setBasePermission()

pocketmine\permission\PermissibleInternal::setBasePermission ( Permission|string  $name,
bool  $grant 
)

Assigns a baseline permission to the permissible. This is always calculated before anything else, which means that permissions set using addAttachment() will always override base permissions. You probably don't want to use this if you're not assigning (denying) operator permissions.

Implements pocketmine\permission\Permissible.

Definition at line 72 of file PermissibleInternal.php.

◆ unsetBasePermission()

pocketmine\permission\PermissibleInternal::unsetBasePermission ( Permission|string  $name)

Unsets a baseline permission previously set. If it wasn't already set, this will have no effect. Note that this might have different results than setting the permission to false.

Implements pocketmine\permission\Permissible.

Definition at line 80 of file PermissibleInternal.php.


The documentation for this class was generated from the following file: