PHP Class Xpressengine\Permission\Permission

Author: XE Team (developers) ([email protected])
显示文件 Open project: xpressengine/xpressengine Class Usage Examples

Protected Properties

Property Type Description
$grant Grant Grant object
$parent Permission Parent Registered instance

Public Methods

Method Description
__construct ( array $attributes = [] ) constructor
addParent ( Permission $parent ) : void Add parent to ancestor
getAttributes ( ) : array returns current attributes
getDepth ( ) : integer Returns depth
getIterator ( ) : ArrayIterato\ArrayIterator Get an iterator for the items.
getParent ( ) : Permission Returns parent registered
offsetExists ( mixed $offset ) : boolean Determine if an item exists at an offset.
offsetGet ( mixed $offset ) : mixed Get an item at a given offset.
offsetSet ( mixed $offset, mixed $value ) : void Set the item at a given offset.
offsetUnset ( string $offset ) : void Unset the item at a given offset.
pure ( string $key ) : mixed | null Get value of without inherit
setGrant ( Grant $grant ) : void Set the grant

Protected Methods

Method Description
isParent ( Permission $parent ) : boolean Check parent of current at a given.

Method Details

__construct() public method

constructor
public __construct ( array $attributes = [] )
$attributes array attributes array

addParent() public method

Add parent to ancestor
public addParent ( Permission $parent ) : void
$parent Permission parent instance
return void

getAttributes() public method

returns current attributes
public getAttributes ( ) : array
return array

getDepth() public method

Returns depth
public getDepth ( ) : integer
return integer

getIterator() public method

Get an iterator for the items.
public getIterator ( ) : ArrayIterato\ArrayIterator
return ArrayIterato\ArrayIterator

getParent() public method

Returns parent registered
public getParent ( ) : Permission
return Permission

isParent() protected method

Check parent of current at a given.
protected isParent ( Permission $parent ) : boolean
$parent Permission parent instance
return boolean

offsetExists() public method

Determine if an item exists at an offset.
public offsetExists ( mixed $offset ) : boolean
$offset mixed array offset
return boolean

offsetGet() public method

Get an item at a given offset.
public offsetGet ( mixed $offset ) : mixed
$offset mixed array offset
return mixed

offsetSet() public method

Set the item at a given offset.
public offsetSet ( mixed $offset, mixed $value ) : void
$offset mixed array offset
$value mixed array value
return void

offsetUnset() public method

Unset the item at a given offset.
public offsetUnset ( string $offset ) : void
$offset string array offset
return void

pure() public method

Get value of without inherit
public pure ( string $key ) : mixed | null
$key string grant action name
return mixed | null

setGrant() public method

Set the grant
public setGrant ( Grant $grant ) : void
$grant Grant grant object
return void

Property Details

$grant protected_oe property

Grant object
protected Grant,Xpressengine\Permission $grant
return Grant

$parent protected_oe property

Parent Registered instance
protected Permission,Xpressengine\Permission $parent
return Permission