PHP 트레잇 TinyAuth\Auth\AclTrait

파일 보기 프로젝트 열기: dereuromark/cakephp-tinyauth

보호된 프로퍼티들

프로퍼티 타입 설명
$_acl array | null
$_roles array | null

보호된 메소드들

메소드 설명
_check ( array $user, array $params ) : boolean Checks the URL to the role(s).
_constructIniKey ( array $params ) : string Constructs an ACL INI section key from a given Request.
_deconstructIniKey ( string $key ) : array Deconstructs an ACL INI section key into a named array with ACL parts.
_defaultConfig ( ) : array
_getAcl ( string | array | null $path = null ) : array Parses INI file and returns the allowed roles per action.
_getAvailableRoles ( ) : array Returns a list of all available roles.
_getUserRoles ( array $user ) : array Returns a list of all roles belonging to the authenticated user.
_mapped ( array $roles ) : array
_parseFiles ( array | string | null $paths, string $file ) : array Returns the acl.ini file(s) as an array.
_prepareConfig ( array $config ) : array

메소드 상세

_check() 보호된 메소드

Allows single or multi role based authorization
protected _check ( array $user, array $params ) : boolean
$user array User data
$params array Request params
리턴 boolean Success

_constructIniKey() 보호된 메소드

Constructs an ACL INI section key from a given Request.
protected _constructIniKey ( array $params ) : string
$params array The request params
리턴 string Hash with named keys for controller, plugin and prefix

_deconstructIniKey() 보호된 메소드

Deconstructs an ACL INI section key into a named array with ACL parts.
protected _deconstructIniKey ( string $key ) : array
$key string INI section key as found in acl.ini
리턴 array Array with named keys for controller, plugin and prefix

_defaultConfig() 보호된 메소드

protected _defaultConfig ( ) : array
리턴 array

_getAcl() 보호된 메소드

Uses cache for maximum performance. Improved speed by several actions before caching: - Resolves role slugs to their primary key / identifier - Resolves wildcards to their verbose translation
protected _getAcl ( string | array | null $path = null ) : array
$path string | array | null
리턴 array Roles

_getAvailableRoles() 보호된 메소드

Will look for a roles array in Configure first, tries database roles table next.
protected _getAvailableRoles ( ) : array
리턴 array List with all available roles

_getUserRoles() 보호된 메소드

Lookup in the following order: - single role id using the roleColumn in single-role mode - direct lookup in the pivot table (to support both Configure and Model in multi-role mode)
protected _getUserRoles ( array $user ) : array
$user array The user to get the roles for
리턴 array List with all role ids belonging to the user

_mapped() 보호된 메소드

protected _mapped ( array $roles ) : array
$roles array
리턴 array

_parseFiles() 보호된 메소드

Returns the acl.ini file(s) as an array.
protected _parseFiles ( array | string | null $paths, string $file ) : array
$paths array | string | null Paths to look for INI file
$file string Full path to the INI file
리턴 array List with all available roles

_prepareConfig() 보호된 메소드

protected _prepareConfig ( array $config ) : array
$config array
리턴 array

프로퍼티 상세

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

protected array|null $_acl
리턴 array | null

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

protected array|null $_roles
리턴 array | null