Property | Type | Description | |
---|---|---|---|
$data | TODO | ||
$name | TODO |
Property | Type | Description | |
---|---|---|---|
$_cacheVersion | integer | Incrementing version number if cached classes change. |
Method | Description | |
---|---|---|
__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. |
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. |
public addCreatorPermission ( integer $permission, boolean $update = true ) | ||
$permission | integer | The permission (DELETE, etc.) to add. |
$update | boolean | Whether to automatically update the backend. |
public addDefaultPermission ( integer $permission, boolean $update = true ) | ||
$permission | integer | The permission (DELETE, etc.) to add. |
$update | boolean | Whether to automatically update the backend. |
public addGuestPermission ( integer $permission, boolean $update = true ) | ||
$permission | integer | The permission (DELETE, etc.) to add. |
$update | boolean | Whether to automatically update the backend. |
public addUserPermission ( $user, integer $permission, boolean $update = true ) | ||
$permission | integer | The permission (DELETE, etc.) to add. |
$update | boolean | Whether to automatically update the backend. |
public getCreatorPermissions ( ) : integer | ||
return | integer | The creator permissions on this object. |
public getDefaultPermissions ( ) : integer | ||
return | integer | The default permissions on this object. |
public getGroupPermissions ( integer $perm = null ) : array | ||
$perm | integer | List only users with this permission level. Defaults to all users. |
return | array | All group permissions for this object, indexed by group. |
public getGuestPermissions ( ) : integer | ||
return | integer | The guest permissions on this object. |
public getUserPermissions ( integer $perm = null ) : array | ||
$perm | integer | List only users with this permission level. Defaults to all users. |
return | array | All user permissions for this object, indexed by user. |
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. |
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. |
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. |
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. |
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. |
public setCacheVersion ( integer $cacheVersion ) | ||
$cacheVersion | integer | The revision number of the class. |
public updatePermissions ( array $perms ) | ||
$perms | array | An array containing the permissions which are to be updated. |
protected int $_cacheVersion | ||
return | integer |