PHP 클래스 Horde_Perms_Permission, horde

Copyright 2009-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
저자: Chuck Hagenbuch ([email protected])
저자: Jan Schneider ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$data TODO
$name TODO

보호된 프로퍼티들

프로퍼티 타입 설명
$_cacheVersion integer Incrementing version number if cached classes change.

공개 메소드들

메소드 설명
__construct ( string $name, integer $cacheVersion = null, string $type = 'matrix', array $params = null ) Constructor.
addCreatorPermission ( integer $permission, boolean $update = true ) Grants creators additional permissions to this object.
addDefaultPermission ( integer $permission, boolean $update = true ) Grants additional default permissions to this object.
addGroupPermission ( integer $groupId, integer $permission, boolean $update = true ) Grants a group additional permissions to this object.
addGuestPermission ( integer $permission, boolean $update = true ) Grants guests additional permissions to this object.
addUserPermission ( $user, integer $permission, boolean $update = true ) Grants a user additional permissions to this object.
get ( string $attribute ) : mixed Gets one of the attributes of the object, or null if it isn't defined.
getCreatorPermissions ( ) : integer Returns the creator permissions on this object.
getData ( ) : array Get permission details.
getDefaultPermissions ( ) : integer Returns the default permissions on this object.
getGroupPermissions ( integer $perm = null ) : array Returns an array of all group permissions on this object.
getGuestPermissions ( ) : integer Returns the guest permissions on this object.
getName ( ) : string Get permission name.
getUserPermissions ( integer $perm = null ) : array Returns an array of all user permissions on this object.
removeCreatorPermission ( integer $permission = null, boolean $update = true ) Removes a permission that creators currently have on this object.
removeDefaultPermission ( integer $permission = null, boolean $update = true ) Removes a default permission on this object.
removeGroupPermission ( integer $groupId = null, integer $permission = null, boolean $update = true ) Removes a permission that a group currently has on this object.
removeGuestPermission ( integer $permission = null, boolean $update = true ) Removes a permission that guests currently have on this object.
removeUserPermission ( string $user = null, integer $permission = null, boolean $update = true ) Removes a permission that a user currently has on this object.
save ( ) TODO
setCacheVersion ( integer $cacheVersion ) Sets the revision number of the class.
setData ( string $data ) Set permission details.
setName ( string $name ) Set permission name
setPerm ( $permId, $permission, $update = true ) TODO
unsetPerm ( $permId, $permission, $update = true ) TODO
updatePermissions ( array $perms ) Updates the permissions based on data passed in the array.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( string $name, integer $cacheVersion = null, string $type = 'matrix', array $params = null )
$name string The name of the perm.
$cacheVersion integer The revision number of the class.
$type string The permission type.
$params array A hash with any parameters that the permission type needs.

addCreatorPermission() 공개 메소드

Grants creators additional permissions to this object.
public addCreatorPermission ( integer $permission, boolean $update = true )
$permission integer The permission (DELETE, etc.) to add.
$update boolean Whether to automatically update the backend.

addDefaultPermission() 공개 메소드

Grants additional default permissions to this object.
public addDefaultPermission ( integer $permission, boolean $update = true )
$permission integer The permission (DELETE, etc.) to add.
$update boolean Whether to automatically update the backend.

addGroupPermission() 공개 메소드

Grants a group additional permissions to this object.
public addGroupPermission ( integer $groupId, integer $permission, boolean $update = true )
$groupId integer The id of the group to grant additional permissions to.
$permission integer The permission (DELETE, etc.) to add.
$update boolean Whether to automatically update the backend.

addGuestPermission() 공개 메소드

Grants guests additional permissions to this object.
public addGuestPermission ( integer $permission, boolean $update = true )
$permission integer The permission (DELETE, etc.) to add.
$update boolean Whether to automatically update the backend.

addUserPermission() 공개 메소드

Grants a user additional permissions to this object.
public addUserPermission ( $user, integer $permission, boolean $update = true )
$permission integer The permission (DELETE, etc.) to add.
$update boolean Whether to automatically update the backend.

get() 공개 메소드

Gets one of the attributes of the object, or null if it isn't defined.
public get ( string $attribute ) : mixed
$attribute string The attribute to get.
리턴 mixed The value of the attribute, or null.

getCreatorPermissions() 공개 메소드

Returns the creator permissions on this object.
public getCreatorPermissions ( ) : integer
리턴 integer The creator permissions on this object.

getData() 공개 메소드

Get permission details.
public getData ( ) : array
리턴 array Permission details.

getDefaultPermissions() 공개 메소드

Returns the default permissions on this object.
public getDefaultPermissions ( ) : integer
리턴 integer The default permissions on this object.

getGroupPermissions() 공개 메소드

Returns an array of all group permissions on this object.
public getGroupPermissions ( integer $perm = null ) : array
$perm integer List only users with this permission level. Defaults to all users.
리턴 array All group permissions for this object, indexed by group.

getGuestPermissions() 공개 메소드

Returns the guest permissions on this object.
public getGuestPermissions ( ) : integer
리턴 integer The guest permissions on this object.

getName() 공개 메소드

Get permission name.
public getName ( ) : string
리턴 string Permission name.

getUserPermissions() 공개 메소드

Returns an array of all user permissions on this object.
public getUserPermissions ( integer $perm = null ) : array
$perm integer List only users with this permission level. Defaults to all users.
리턴 array All user permissions for this object, indexed by user.

removeCreatorPermission() 공개 메소드

Removes a permission that creators currently have on this object.
public removeCreatorPermission ( integer $permission = null, boolean $update = true )
$permission integer The permission (DELETE, etc.) to remove. Defaults to all permissions.
$update boolean Whether to automatically update the backend.

removeDefaultPermission() 공개 메소드

Removes a default permission on this object.
public removeDefaultPermission ( integer $permission = null, boolean $update = true )
$permission integer The permission (DELETE, etc.) to remove. Defaults to all permissions.
$update boolean Whether to automatically update the backend.

removeGroupPermission() 공개 메소드

Removes a permission that a group currently has on this object.
public removeGroupPermission ( integer $groupId = null, integer $permission = null, boolean $update = true )
$groupId integer The id of the group to remove the permission from. Defaults to all groups.
$permission integer The permission (DELETE, etc.) to remove. Defaults to all permissions.
$update boolean Whether to automatically update the backend.

removeGuestPermission() 공개 메소드

Removes a permission that guests currently have on this object.
public removeGuestPermission ( integer $permission = null, boolean $update = true )
$permission integer The permission (DELETE, etc.) to remove. Defaults to all permissions.
$update boolean Whether to automatically update the backend.

removeUserPermission() 공개 메소드

Removes a permission that a user currently has on this object.
public removeUserPermission ( string $user = null, integer $permission = null, boolean $update = true )
$user string The user to remove the permission from. Defaults to all users.
$permission integer The permission (DELETE, etc.) to remove. Defaults to all permissions.
$update boolean Whether to automatically update the backend.

save() 공개 메소드

TODO
public save ( )

setCacheVersion() 공개 메소드

Sets the revision number of the class.
public setCacheVersion ( integer $cacheVersion )
$cacheVersion integer The revision number of the class.

setData() 공개 메소드

Set permission details.
public setData ( string $data )
$data string Permission details.

setName() 공개 메소드

Set permission name
public setName ( string $name )
$name string Permission name.

setPerm() 공개 메소드

TODO
public setPerm ( $permId, $permission, $update = true )

unsetPerm() 공개 메소드

TODO
public unsetPerm ( $permId, $permission, $update = true )

updatePermissions() 공개 메소드

Updates the permissions based on data passed in the array.
public updatePermissions ( array $perms )
$perms array An array containing the permissions which are to be updated.

프로퍼티 상세

$_cacheVersion 보호되어 있는 프로퍼티

Incrementing version number if cached classes change.
protected int $_cacheVersion
리턴 integer

$data 공개적으로 프로퍼티

TODO
public $data

$name 공개적으로 프로퍼티

TODO
public $name