PHP Класс li3_access\security\Access

Наследование: extends lithium\core\Adaptable
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$_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