PermissionHelper
class PermissionHelper
Class to encapsulate permission checks
Constants
MODE_USER_READ |
|
MODE_USER_WRITE |
|
MODE_GROUP_READ |
|
MODE_GROUP_WRITE |
|
MODE_WORLD_READ |
|
MODE_WORLD_WRITE |
|
Methods
No description
Checks whether user_id on file is the same as executing user
Checks whether file is readable for user
Checks whether file is writable for user
Checks whether group_id on file is the same as executing user
Checks whether file is readable for group
Checks whether file is writable for group
Checks whether file is readable for world
Checks whether file is writable for world
Checks whether file is readable (by user, group or world)
Checks whether file is writable (by user, group or world)
Checks whether userid is 0 - root.
Details
at line 45
__construct(int $uid = null, int $gid = null)
at line 56
bool
userIsOwner()
Checks whether user_id on file is the same as executing user
at line 66
bool
userCanRead()
Checks whether file is readable for user
at line 76
bool
userCanWrite()
Checks whether file is writable for user
at line 86
bool
groupIsOwner()
Checks whether group_id on file is the same as executing user
at line 96
bool
groupCanRead()
Checks whether file is readable for group
at line 106
bool
groupCanWrite()
Checks whether file is writable for group
at line 116
bool
worldCanRead()
Checks whether file is readable for world
at line 126
bool
worldCanWrite()
Checks whether file is writable for world
at line 136
bool
isReadable()
Checks whether file is readable (by user, group or world)
at line 146
bool
isWritable()
Checks whether file is writable (by user, group or world)
at line 156
bool
userIsRoot()
Checks whether userid is 0 - root.