MetaFox

PrivacyPolicyRepository
in package
implements PrivacyPolicy

Class PrivacyPolicyRepository.

Tags
SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

SuppressWarnings

(PHPMD.CouplingBetweenObjects)

SuppressWarnings

(PHPMD.ExcessiveClassComplexity)

see
PrivacyPolicy

Table of Contents

Interfaces

PrivacyPolicy

Properties

$permissionOnOwner  : array<string, bool>

Methods

checkBlockUser()  : bool
checkCreateOnOwner()  : bool
Check an User can post on another user.
checkCreateResourceOnOwner()  : bool
Check an User can post an specific resource on another user.
checkItemPrivacy()  : bool
checkPermission()  : bool
Check permission on resource.
checkPermissionOwner()  : bool
Check permission on owner.
getPrivacyItem()  : array<string, mixed>
Get privacy item by privacy ids.
getResourcePrivacyList()  : array<string|int, int>
Get privacy list of a resource.
hasAbilityOnOwner()  : bool
Check user has ability on owner.
checkPublicPermissionOwner()  : bool
checkHasAbility()  : bool
checkPermissionOwnerCache()  : bool|null
handleCheckPermissionOwner()  : bool
setPermissionOwnerCache()  : void

Properties

Methods

checkCreateResourceOnOwner()

Check an User can post an specific resource on another user.

public checkCreateResourceOnOwner(Content $content) : bool
Parameters
$content : Content
Return values
bool

checkItemPrivacy()

public checkItemPrivacy(User $user, User $owner, HasPrivacy $content[, array<string|int, mixed>|null $privacyIds = null ]) : bool
Parameters
$user : User
$owner : User
$content : HasPrivacy
$privacyIds : array<string|int, mixed>|null = null
Return values
bool

checkPermissionOwner()

Check permission on owner.

public checkPermissionOwner(User $user, User|null $owner[, bool $cache = true ]) : bool
Parameters
$user : User
$owner : User|null
$cache : bool = true
Tags
inheritdoc
SuppressWarnings

(PHPMD.BooleanArgumentFlag)

Return values
bool

getPrivacyItem()

Get privacy item by privacy ids.

public getPrivacyItem(Content $content) : array<string, mixed>
Parameters
$content : Content
Return values
array<string, mixed>

getResourcePrivacyList()

Get privacy list of a resource.

public getResourcePrivacyList(Content $content) : array<string|int, int>

If model implement HasResourceStream it will use its own stream. Otherwise it will use global stream.

Parameters
$content : Content
Return values
array<string|int, int>

hasAbilityOnOwner()

Check user has ability on owner.

public hasAbilityOnOwner(User $user, User $owner, int $privacy[, string $privacyType = null ]) : bool
Parameters
$user : User
$owner : User
$privacy : int
$privacyType : string = null
Return values
bool

checkHasAbility()

private checkHasAbility(User $user, array<string|int, mixed> $privacyIds, int $privacy) : bool
Parameters
$user : User
$privacyIds : array<string|int, mixed>
$privacy : int
Return values
bool

        
On this page

Search results