PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
pocketmine\permission\Permission Class Reference
+ Collaboration diagram for pocketmine\permission\Permission:

Public Member Functions

 __construct ($name, $description=null, $defaultValue=null, array $children=[])
 
 getName ()
 
getChildren ()
 
 getDefault ()
 
 setDefault ($value)
 
 getDescription ()
 
 setDescription ($value)
 
 getPermissibles ()
 
 recalculatePermissibles ()
 
 addParent ($name, $value)
 

Static Public Member Functions

static getByName ($value)
 
static loadPermissions (array $data, $default=self::DEFAULT_OP)
 
static loadPermission ($name, array $data, $default=self::DEFAULT_OP, &$output=[])
 

Public Attributes

const DEFAULT_OP = "op"
 
const DEFAULT_NOT_OP = "notop"
 
const DEFAULT_TRUE = "true"
 
const DEFAULT_FALSE = "false"
 

Static Public Attributes

static $DEFAULT_PERMISSION = self::DEFAULT_OP
 

Detailed Description

Represents a permission

Definition at line 32 of file Permission.php.

Constructor & Destructor Documentation

pocketmine\permission\Permission::__construct (   $name,
  $description = null,
  $defaultValue = null,
array  $children = [] 
)

Creates a new Permission object to be attached to Permissible objects

Parameters
string$name
string$description
string$defaultValue
Permission[]$children

Definition at line 100 of file Permission.php.

Member Function Documentation

pocketmine\permission\Permission::addParent (   $name,
  $value 
)
Parameters
string | Permission$name
$value
Returns
Permission|void

Definition at line 178 of file Permission.php.

References pocketmine\Server\getInstance(), and pocketmine\permission\Permission\getName().

+ Here is the call graph for this function:

static pocketmine\permission\Permission::getByName (   $value)
static
Parameters
$value
Returns
string

Definition at line 45 of file Permission.php.

Referenced by pocketmine\permission\Permission\loadPermission().

+ Here is the caller graph for this function:

& pocketmine\permission\Permission::getChildren ( )
Returns
string[]

Definition at line 119 of file Permission.php.

pocketmine\permission\Permission::getDefault ( )
Returns
string

Definition at line 126 of file Permission.php.

pocketmine\permission\Permission::getDescription ( )
Returns
string

Definition at line 143 of file Permission.php.

pocketmine\permission\Permission::getPermissibles ( )
Returns
Permissible[]

Definition at line 157 of file Permission.php.

References pocketmine\Server\getInstance().

+ Here is the call graph for this function:

static pocketmine\permission\Permission::loadPermission (   $name,
array  $data,
  $default = self::DEFAULT_OP,
$output = [] 
)
static
Parameters
string$name
array$data
string$default
array$output
Returns
Permission
Exceptions
\Exception

Definition at line 220 of file Permission.php.

References pocketmine\permission\Permission\getByName().

+ Here is the call graph for this function:

static pocketmine\permission\Permission::loadPermissions ( array  $data,
  $default = self::DEFAULT_OP 
)
static
Parameters
array$data
$default
Returns
Permission[]

Definition at line 201 of file Permission.php.

pocketmine\permission\Permission::setDefault (   $value)
Parameters
string$value

Definition at line 133 of file Permission.php.

pocketmine\permission\Permission::setDescription (   $value)
Parameters
string$value

Definition at line 150 of file Permission.php.


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