PocketMine
Permission Class Reference

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=[])
 

Data Fields

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

Constructor & Destructor Documentation

__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

Member Function Documentation

addParent (   $name,
  $value 
)
Parameters
string | Permission$name
$value
Returns
Permission|void Permission if $name is a string, void if it's a Permission
static getByName (   $value)
static
Parameters
$value
Returns
string
& getChildren ( )
Returns
string[]
getDefault ( )
Returns
string
getDescription ( )
Returns
string
getName ( )
Returns
string
getPermissibles ( )
Returns
Permissible[]
static loadPermission (   $name,
array  $data,
  $default = self::DEFAULT_OP,
$output = [] 
)
static
Parameters
string$name
array$data
string$default
array$output
Returns
Permission
Exceptions
static loadPermissions ( array  $data,
  $default = self::DEFAULT_OP 
)
static
Parameters
array$data
$default
Returns
Permission[]
setDefault (   $value)
Parameters
string$value
setDescription (   $value)
Parameters
string$value

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