PHP 클래스 ZF\Apigility\Admin\Model\AuthorizationModel

파일 보기 프로젝트 열기: zfcampus/zf-apigility-admin

보호된 프로퍼티들

프로퍼티 타입 설명
$configResource ZF\Configuration\ConfigResource
$module string
$moduleEntity ModuleEntity
$modulePath string
$modules ModulePathSpec

공개 메소드들

메소드 설명
__construct ( ModuleEntity $moduleEntity, ModulePathSpec $modules, ZF\Configuration\ConfigResource $config )
fetch ( integer $version = 1 ) : AuthorizationEntity Fetch authorization list for a given module by version
update ( array $privileges, integer $version = 1 ) : AuthorizationEntity Update the authorization list for a given module by version

보호된 메소드들

메소드 설명
createDefaultPrivileges ( integer $version, array $config ) : AuthorizationEntity Create default privileges for all services of a specific version in the module
createDefaultPrivilegesForRestServices ( array $services, AuthorizationEntity $entity, integer $version ) Create default privileges for a list of REST services of the specified version
createDefaultPrivilegesForRpcServices ( array $services, AuthorizationEntity $entity, array $config, integer $version ) Create default privileges for a list of RPC services of the specified version
discoverActionForRpcService ( string $serviceName, array $serviceConfig, array $config ) : string Attempt to identify the action associated with an RPC service
filterServicesByVersion ( array $config, integer $version ) : array Removes any services that do not match the current version
getBaseServiceNamesFromEntity ( AuthorizationEntity $entity ) : array Determine the base service name for authorization service keys
injectServicesWithoutPrivileges ( AuthorizationEntity $entity, integer $version, array $config ) Identify services in the current version without authorization configuration and inject them into the entity
remapServiceNamesForPayload ( array $config ) : array Translate service names to match the payload expectations.
remapServiceNamesForStorage ( array $config ) : array Translate service names to match the storage expectations.

메소드 상세

__construct() 공개 메소드

public __construct ( ModuleEntity $moduleEntity, ModulePathSpec $modules, ZF\Configuration\ConfigResource $config )
$moduleEntity ModuleEntity
$modules ModulePathSpec
$config ZF\Configuration\ConfigResource

createDefaultPrivileges() 보호된 메소드

Create default privileges for all services of a specific version in the module
protected createDefaultPrivileges ( integer $version, array $config ) : AuthorizationEntity
$version integer
$config array
리턴 AuthorizationEntity

createDefaultPrivilegesForRestServices() 보호된 메소드

Create default privileges for a list of REST services of the specified version
protected createDefaultPrivilegesForRestServices ( array $services, AuthorizationEntity $entity, integer $version )
$services array
$entity AuthorizationEntity
$version integer

createDefaultPrivilegesForRpcServices() 보호된 메소드

Create default privileges for a list of RPC services of the specified version
protected createDefaultPrivilegesForRpcServices ( array $services, AuthorizationEntity $entity, array $config, integer $version )
$services array
$entity AuthorizationEntity
$config array Used to determine action associated with RPC service (via route config)
$version integer

discoverActionForRpcService() 보호된 메소드

Looks for an "action" default in the route options associated with the RPC service. If no route name is provided, or no "action" default is found, returns "index".
protected discoverActionForRpcService ( string $serviceName, array $serviceConfig, array $config ) : string
$serviceName string
$serviceConfig array
$config array
리턴 string

fetch() 공개 메소드

Fetch authorization list for a given module by version
public fetch ( integer $version = 1 ) : AuthorizationEntity
$version integer
리턴 AuthorizationEntity

filterServicesByVersion() 보호된 메소드

Removes any services that do not match the current version
protected filterServicesByVersion ( array $config, integer $version ) : array
$config array
$version integer
리턴 array

getBaseServiceNamesFromEntity() 보호된 메소드

Determine the base service name for authorization service keys
protected getBaseServiceNamesFromEntity ( AuthorizationEntity $entity ) : array
$entity AuthorizationEntity
리턴 array

injectServicesWithoutPrivileges() 보호된 메소드

Identify services in the current version without authorization configuration and inject them into the entity
protected injectServicesWithoutPrivileges ( AuthorizationEntity $entity, integer $version, array $config )
$entity AuthorizationEntity
$version integer
$config array

remapServiceNamesForPayload() 보호된 메소드

Translate service names to match the payload expectations.
protected remapServiceNamesForPayload ( array $config ) : array
$config array
리턴 array

remapServiceNamesForStorage() 보호된 메소드

Translate service names to match the storage expectations.
protected remapServiceNamesForStorage ( array $config ) : array
$config array
리턴 array

update() 공개 메소드

Update the authorization list for a given module by version
public update ( array $privileges, integer $version = 1 ) : AuthorizationEntity
$privileges array
$version integer
리턴 AuthorizationEntity

프로퍼티 상세

$configResource 보호되어 있는 프로퍼티

protected ConfigResource,ZF\Configuration $configResource
리턴 ZF\Configuration\ConfigResource

$module 보호되어 있는 프로퍼티

protected string $module
리턴 string

$moduleEntity 보호되어 있는 프로퍼티

protected ModuleEntity,ZF\Apigility\Admin\Model $moduleEntity
리턴 ModuleEntity

$modulePath 보호되어 있는 프로퍼티

protected string $modulePath
리턴 string

$modules 보호되어 있는 프로퍼티

protected ModulePathSpec $modules
리턴 ModulePathSpec