PHP 클래스 eZ\Publish\Core\Persistence\Legacy\User\Handler

상속: implements eZ\Publish\SPI\Persistence\User\Handler
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel

보호된 프로퍼티들

프로퍼티 타입 설명
$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