PHP Trait Cartalyst\Sentinel\Permissions\PermissibleTrait

显示文件 Open project: cartalyst/sentinel

Protected Properties

Property Type Description
$permissionsClass string The permissions instance class name.
$permissionsInstance Cartalyst\Sentinel\Permissions\PermissionsInterface The cached permissions instance for the given user.

Public Methods

Method Description
addPermission ( $permission, $value = true ) {@inheritDoc}
getPermissions ( ) : array Returns the permissions.
getPermissionsClass ( ) : string Returns the permissions class name.
getPermissionsInstance ( ) {@inheritDoc}
removePermission ( $permission ) {@inheritDoc}
setPermissions ( array $permissions ) : void Sets permissions.
setPermissionsClass ( string $permissionsClass ) : void Sets the permissions class name.
updatePermission ( $permission, $value = true, $create = false ) {@inheritDoc}

Protected Methods

Method Description
createPermissions ( ) : Cartalyst\Sentinel\Permissions\PermissionsInterface Creates the permissions object.

Method Details

addPermission() public method

{@inheritDoc}
public addPermission ( $permission, $value = true )

createPermissions() abstract protected method

Creates the permissions object.
abstract protected createPermissions ( ) : Cartalyst\Sentinel\Permissions\PermissionsInterface
return Cartalyst\Sentinel\Permissions\PermissionsInterface

getPermissions() public method

Returns the permissions.
public getPermissions ( ) : array
return array

getPermissionsClass() public static method

Returns the permissions class name.
public static getPermissionsClass ( ) : string
return string

getPermissionsInstance() public method

{@inheritDoc}

removePermission() public method

{@inheritDoc}
public removePermission ( $permission )

setPermissions() public method

Sets permissions.
public setPermissions ( array $permissions ) : void
$permissions array
return void

setPermissionsClass() public static method

Sets the permissions class name.
public static setPermissionsClass ( string $permissionsClass ) : void
$permissionsClass string
return void

updatePermission() public method

{@inheritDoc}
public updatePermission ( $permission, $value = true, $create = false )

Property Details

$permissionsClass protected_oe static_oe property

The permissions instance class name.
protected static string $permissionsClass
return string

$permissionsInstance protected_oe property

The cached permissions instance for the given user.
protected PermissionsInterface,Cartalyst\Sentinel\Permissions $permissionsInstance
return Cartalyst\Sentinel\Permissions\PermissionsInterface