PHP Класс eZ\Publish\Core\Persistence\Legacy\User\Handler

Наследование: implements eZ\Publish\SPI\Persistence\User\Handler
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$limitationConverter eZ\Publish\Core\Persistence\Legacy\User\Role\LimitationConverter
$mapper Mapper Mapper for user related objects.
$roleGateway eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway Gateway for storing role data.
$userGateway Gateway Gateway for storing user data.

Открытые методы

Метод Описание
__construct ( Gateway $userGateway, Gateway $roleGateway, Mapper $mapper, LimitationConverter $limitationConverter ) Construct from userGateway.
addPolicy ( mixed $roleId, eZ\Publish\SPI\Persistence\User\Policy $policy ) : eZ\Publish\SPI\Persistence\User\Policy Adds a policy to a role.
addPolicyByRoleDraft ( mixed $roleId, eZ\Publish\SPI\Persistence\User\Policy $policy ) : eZ\Publish\SPI\Persistence\User\Policy Adds a policy to a role draft.
assignRole ( mixed $contentId, mixed $roleId, array $limitation = null ) Assigns role to a user or user group with given limitations.
create ( eZ\Publish\SPI\Persistence\User $user ) : eZ\Publish\SPI\Persistence\User Create a user.
createRole ( eZ\Publish\SPI\Persistence\User\RoleCreateStruct $createStruct ) : eZ\Publish\SPI\Persistence\User\Role Create new role draft.
createRoleDraft ( mixed $roleId ) : eZ\Publish\SPI\Persistence\User\Role Creates a draft of existing defined role.
delete ( mixed $userId ) Delete user with the given ID.
deletePolicy ( mixed $policyId ) Removes a policy from a role.
deleteRole ( mixed $roleId, integer $status = Role::STATUS_DEFINED ) Delete the specified role (draft).
load ( mixed $userId ) : eZ\Publish\SPI\Persistence\User Loads user with user ID.
loadByEmail ( string $email ) : eZ\Publish\SPI\Persistence\User[] Loads user(s) with user email.
loadByLogin ( string $login ) : eZ\Publish\SPI\Persistence\User Loads user with user login.
loadPoliciesByUserId ( mixed $userId ) : eZ\Publish\SPI\Persistence\User\Policy[] Returns the user policies associated with the user (including inherited policies from user groups).
loadRole ( mixed $roleId, integer $status = Role::STATUS_DEFINED ) : eZ\Publish\SPI\Persistence\User\Role Loads a specified role (draft) by $roleId and $status.
loadRoleAssignment ( mixed $roleAssignmentId ) : eZ\Publish\SPI\Persistence\User\RoleAssignment Loads role assignment for specified assignment ID.
loadRoleAssignmentsByGroupId ( mixed $groupId, boolean $inherit = false ) : eZ\Publish\SPI\Persistence\User\RoleAssignment[] Loads roles assignments to a user/group.
loadRoleAssignmentsByRoleId ( mixed $roleId ) : eZ\Publish\SPI\Persistence\User\RoleAssignment[] Loads roles assignments Role.
loadRoleByIdentifier ( string $identifier, integer $status = Role::STATUS_DEFINED ) : eZ\Publish\SPI\Persistence\User\Role Loads a specified role (draft) by $identifier and $status.
loadRoleDraftByRoleId ( mixed $roleId ) : eZ\Publish\SPI\Persistence\User\Role Loads a role draft by the original role ID.
loadRoles ( ) : eZ\Publish\SPI\Persistence\User\Role[] Loads all roles.
publishRoleDraft ( mixed $roleDraftId ) Publish the specified role draft.
removeRoleAssignment ( mixed $roleAssignmentId ) Un-assign a role by assignment ID.
unassignRole ( mixed $contentId, mixed $roleId ) Un-assign a role.
update ( eZ\Publish\SPI\Persistence\User $user ) Update the user information specified by the user struct.
updatePolicy ( eZ\Publish\SPI\Persistence\User\Policy $policy ) Update a policy.
updateRole ( eZ\Publish\SPI\Persistence\User\RoleUpdateStruct $role ) Update role (draft).

Защищенные методы

Метод Описание
internalCreateRole ( eZ\Publish\SPI\Persistence\User\RoleCreateStruct $createStruct, mixed | null $roleId = null ) : eZ\Publish\SPI\Persistence\User\Role Internal method for creating Role.

Описание методов

__construct() публичный Метод

Construct from userGateway.
public __construct ( Gateway $userGateway, Gateway $roleGateway, Mapper $mapper, LimitationConverter $limitationConverter )
$userGateway Gateway
$roleGateway eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway
$mapper Mapper
$limitationConverter eZ\Publish\Core\Persistence\Legacy\User\Role\LimitationConverter

addPolicy() публичный Метод

Adds a policy to a role.
public addPolicy ( mixed $roleId, eZ\Publish\SPI\Persistence\User\Policy $policy ) : eZ\Publish\SPI\Persistence\User\Policy
$roleId mixed
$policy eZ\Publish\SPI\Persistence\User\Policy
Результат eZ\Publish\SPI\Persistence\User\Policy

addPolicyByRoleDraft() публичный Метод

Adds a policy to a role draft.
public addPolicyByRoleDraft ( mixed $roleId, eZ\Publish\SPI\Persistence\User\Policy $policy ) : eZ\Publish\SPI\Persistence\User\Policy
$roleId mixed
$policy eZ\Publish\SPI\Persistence\User\Policy
Результат eZ\Publish\SPI\Persistence\User\Policy

assignRole() публичный Метод

The limitation array looks like: array( 'Subtree' => array( '/1/2/', '/1/4/', ), 'Foo' => array( 'Bar' ), … ) Where the keys are the limitation identifiers, and the respective values are an array of limitation values. The limitation parameter is optional.
public assignRole ( mixed $contentId, mixed $roleId, array $limitation = null )
$contentId mixed The groupId or userId to assign the role to.
$roleId mixed
$limitation array

create() публичный Метод

The User struct used to create the user will contain an ID which is used to reference the user.
public create ( eZ\Publish\SPI\Persistence\User $user ) : eZ\Publish\SPI\Persistence\User
$user eZ\Publish\SPI\Persistence\User
Результат eZ\Publish\SPI\Persistence\User

createRole() публичный Метод

Sets status to Role::STATUS_DRAFT on the new returned draft.
public createRole ( eZ\Publish\SPI\Persistence\User\RoleCreateStruct $createStruct ) : eZ\Publish\SPI\Persistence\User\Role
$createStruct eZ\Publish\SPI\Persistence\User\RoleCreateStruct
Результат eZ\Publish\SPI\Persistence\User\Role

createRoleDraft() публичный Метод

Sets status to Role::STATUS_DRAFT on the new returned draft.
public createRoleDraft ( mixed $roleId ) : eZ\Publish\SPI\Persistence\User\Role
$roleId mixed
Результат eZ\Publish\SPI\Persistence\User\Role

delete() публичный Метод

Delete user with the given ID.
public delete ( mixed $userId )
$userId mixed

deletePolicy() публичный Метод

Removes a policy from a role.
public deletePolicy ( mixed $policyId )
$policyId mixed

deleteRole() публичный Метод

Delete the specified role (draft).
public deleteRole ( mixed $roleId, integer $status = Role::STATUS_DEFINED )
$roleId mixed
$status integer One of Role::STATUS_DEFINED|Role::STATUS_DRAFT

internalCreateRole() защищенный Метод

Used by self::createRole() and self::createRoleDraft()
protected internalCreateRole ( eZ\Publish\SPI\Persistence\User\RoleCreateStruct $createStruct, mixed | null $roleId = null ) : eZ\Publish\SPI\Persistence\User\Role
$createStruct eZ\Publish\SPI\Persistence\User\RoleCreateStruct
$roleId mixed | null Used by self::createRoleDraft() to retain Role id in the draft
Результат eZ\Publish\SPI\Persistence\User\Role

load() публичный Метод

Loads user with user ID.
public load ( mixed $userId ) : eZ\Publish\SPI\Persistence\User
$userId mixed
Результат eZ\Publish\SPI\Persistence\User

loadByEmail() публичный Метод

As earlier eZ Publish versions supported several users having same email (ini config), this function may return several users.
public loadByEmail ( string $email ) : eZ\Publish\SPI\Persistence\User[]
$email string
Результат eZ\Publish\SPI\Persistence\User[]

loadByLogin() публичный Метод

Loads user with user login.
public loadByLogin ( string $login ) : eZ\Publish\SPI\Persistence\User
$login string
Результат eZ\Publish\SPI\Persistence\User

loadPoliciesByUserId() публичный Метод

Returns the user policies associated with the user (including inherited policies from user groups).
public loadPoliciesByUserId ( mixed $userId ) : eZ\Publish\SPI\Persistence\User\Policy[]
$userId mixed
Результат eZ\Publish\SPI\Persistence\User\Policy[]

loadRole() публичный Метод

Loads a specified role (draft) by $roleId and $status.
public loadRole ( mixed $roleId, integer $status = Role::STATUS_DEFINED ) : eZ\Publish\SPI\Persistence\User\Role
$roleId mixed
$status integer One of Role::STATUS_DEFINED|Role::STATUS_DRAFT
Результат eZ\Publish\SPI\Persistence\User\Role

loadRoleAssignment() публичный Метод

Loads role assignment for specified assignment ID.
public loadRoleAssignment ( mixed $roleAssignmentId ) : eZ\Publish\SPI\Persistence\User\RoleAssignment
$roleAssignmentId mixed
Результат eZ\Publish\SPI\Persistence\User\RoleAssignment

loadRoleAssignmentsByGroupId() публичный Метод

Role Assignments with same roleId and limitationIdentifier will be merged together into one.
public loadRoleAssignmentsByGroupId ( mixed $groupId, boolean $inherit = false ) : eZ\Publish\SPI\Persistence\User\RoleAssignment[]
$groupId mixed In legacy storage engine this is the content object id roles are assigned to in ezuser_role. By the nature of legacy this can currently also be used to get by $userId.
$inherit boolean If true also return inherited role assignments from user groups.
Результат eZ\Publish\SPI\Persistence\User\RoleAssignment[]

loadRoleAssignmentsByRoleId() публичный Метод

Role Assignments with same roleId and limitationIdentifier will be merged together into one.
public loadRoleAssignmentsByRoleId ( mixed $roleId ) : eZ\Publish\SPI\Persistence\User\RoleAssignment[]
$roleId mixed
Результат eZ\Publish\SPI\Persistence\User\RoleAssignment[]

loadRoleByIdentifier() публичный Метод

Loads a specified role (draft) by $identifier and $status.
public loadRoleByIdentifier ( string $identifier, integer $status = Role::STATUS_DEFINED ) : eZ\Publish\SPI\Persistence\User\Role
$identifier string
$status integer One of Role::STATUS_DEFINED|Role::STATUS_DRAFT
Результат eZ\Publish\SPI\Persistence\User\Role

loadRoleDraftByRoleId() публичный Метод

Loads a role draft by the original role ID.
public loadRoleDraftByRoleId ( mixed $roleId ) : eZ\Publish\SPI\Persistence\User\Role
$roleId mixed ID of the role the draft was created from.
Результат eZ\Publish\SPI\Persistence\User\Role

loadRoles() публичный Метод

Loads all roles.
public loadRoles ( ) : eZ\Publish\SPI\Persistence\User\Role[]
Результат eZ\Publish\SPI\Persistence\User\Role[]

publishRoleDraft() публичный Метод

Publish the specified role draft.
public publishRoleDraft ( mixed $roleDraftId )
$roleDraftId mixed

removeRoleAssignment() публичный Метод

Un-assign a role by assignment ID.
public removeRoleAssignment ( mixed $roleAssignmentId )
$roleAssignmentId mixed The assignment ID.

unassignRole() публичный Метод

Un-assign a role.
public unassignRole ( mixed $contentId, mixed $roleId )
$contentId mixed The user or user group Id to un-assign the role from.
$roleId mixed

update() публичный Метод

Update the user information specified by the user struct.
public update ( eZ\Publish\SPI\Persistence\User $user )
$user eZ\Publish\SPI\Persistence\User

updatePolicy() публичный Метод

Replaces limitations values with new values.
public updatePolicy ( eZ\Publish\SPI\Persistence\User\Policy $policy )
$policy eZ\Publish\SPI\Persistence\User\Policy

updateRole() публичный Метод

Update role (draft).
public updateRole ( eZ\Publish\SPI\Persistence\User\RoleUpdateStruct $role )
$role eZ\Publish\SPI\Persistence\User\RoleUpdateStruct

Описание свойств

$limitationConverter защищенное свойство

protected LimitationConverter,eZ\Publish\Core\Persistence\Legacy\User\Role $limitationConverter
Результат eZ\Publish\Core\Persistence\Legacy\User\Role\LimitationConverter

$mapper защищенное свойство

Mapper for user related objects.
protected Mapper,eZ\Publish\Core\Persistence\Legacy\User $mapper
Результат Mapper

$roleGateway защищенное свойство

Gateway for storing role data.
protected Gateway,eZ\Publish\Core\Persistence\Legacy\User\Role $roleGateway
Результат eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway

$userGateway защищенное свойство

Gateway for storing user data.
protected Gateway,eZ\Publish\Core\Persistence\Legacy\User $userGateway
Результат Gateway