PHP 클래스 li3_access\security\Access

상속: extends lithium\core\Adaptable
파일 보기 프로젝트 열기: tmaiaroto/li3_access 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_adapters Libraries::locate() compatible path to adapters for this class.
$_classes Dynamic class dependencies.
$_configurations Stores configurations for various authentication adapters.

공개 메소드들

메소드 설명
check ( string $name, mixed $user, mixed $params, array $options = [] ) : Array Performs an access check against the specified configuration, and returns true if access is permitted and an array with additional details if access is denied.

보호된 메소드들

메소드 설명
_initConfig ( string $name, array $config ) : array Called when an adapter configuration is first accessed, this method sets the default configuration for session handling. While each configuration can use its own session class and options, this method initializes them to the default dependencies written into the class.

메소드 상세

_initConfig() 보호된 정적인 메소드

For the session key name, the default value is set to the name of the configuration.
protected static _initConfig ( string $name, array $config ) : array
$name string The name of the adapter configuration being accessed.
$config array The user-specified configuration.
리턴 array Returns an array that merges the user-specified configuration with the generated default values.

check() 공개 정적인 메소드

The data return when access is not permitted will vary by adapter, but it is ideal to have a "message" and a "redirect" so that a user can be notified about why they were denied access and so they can be redirected somewhere to, perhaps, login.
public static check ( string $name, mixed $user, mixed $params, array $options = [] ) : Array
$name string The name of the `Access` configuration/adapter to check against.
$user mixed The user data array that holds all necessary information about the user requesting access. Or `false` (because `Auth::check()` can return `false`).
$params mixed The Lithium `Request` object, or an array with at least 'request', and 'params'
$options array An array of additional options.
리턴 Array An empty array if access is allowed and an array with reasons for denial if denied.

프로퍼티 상세

$_adapters 보호되어 있는 정적으로 프로퍼티

Libraries::locate() compatible path to adapters for this class.
또한 보기: lithium\core\Libraries::locate()
protected static $_adapters

$_classes 보호되어 있는 정적으로 프로퍼티

Dynamic class dependencies.
protected static $_classes

$_configurations 보호되어 있는 정적으로 프로퍼티

Stores configurations for various authentication adapters.
protected static $_configurations