\Pydio\Access\Core\FilterAJXP_PermissionMask

Class AJXP_PermissionMask

Stores a mapping of path => AJXP_Permission that can be used as a mask on an existing folder structure.

Summary

Methods
Properties
Constants
__construct()
getTree()
updateTree()
updateBranch()
deleteBranch()
override()
copyMask()
match()
flattenTree()
toStr()
printSpace()
jsonSerialize()
serialize()
unserialize()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
mergeTrees()
pathToBranch()
$permissionTree
N/A

Properties

$permissionTree

$permissionTree : array

Type

array

Methods

__construct()

__construct(array|null  $serializedForm = null) 

Initialize an empty mask, or from a serializedForm.

Parameters

array|null $serializedForm

getTree()

getTree() : array

Returns the whole permission tree

Returns

array

updateTree()

updateTree(array  $tree) : \Pydio\Access\Core\Filter\AJXP_PermissionMask;

Set the permision tree at once

Parameters

array $tree

Returns

\Pydio\Access\Core\Filter\AJXP_PermissionMask;

match()

match(string  $test, string  $permission) : boolean

Test if a given path does have the given permission according to this mask permission tree.

Parameters

string $test
string $permission

Returns

boolean

flattenTree()

flattenTree(array|null  $tree = null, array|null  $pathes = null, string  $currentRoot = "") : array<mixed,\Pydio\Access\Core\Filter\AJXP_Permission>

Transform the permission tree into a flat structure of pathes => permissions.

Parameters

array|null $tree
array|null $pathes
string $currentRoot

Returns

array<mixed,\Pydio\Access\Core\Filter\AJXP_Permission>

toStr()

toStr(  $permissionTree,   $level) 

Print the tree as a string (for debug puprpose).

Parameters

$permissionTree
$level

printSpace()

printSpace(integer  $number) 

Parameters

integer $number

jsonSerialize()

jsonSerialize() : mixed

Specify data which should be serialized to JSON

Returns

mixed —

data which can be serialized by json_encode, which is a value of any type other than a resource.

serialize()

serialize() : string

String representation of object

Returns

string —

the string representation of the object or null

unserialize()

unserialize(string  $serialized) : void

Constructs the object

Parameters

string $serialized

The string representation of the object.

mergeTrees()

mergeTrees(array  $t1, array  $t2) : array

Merge two trees

Parameters

array $t1
array $t2

Returns

array

pathToBranch()

pathToBranch(string  $path, \Pydio\Access\Core\Filter\AJXP_Permission  $permission) : array

Translate a path=> AJXP_Permission to an array-based branch.

Parameters

string $path
\Pydio\Access\Core\Filter\AJXP_Permission $permission

Returns

array