PHP Класс Devise\Users\Permissions\PermissionsManager

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$errors array Errors are kept in an array and can be used later if validation fails and we want to know why
$message string This is a message that we can store why the validation failed
$messages Validation messages

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

Свойство Тип Описание
$ConfigFileManager

Открытые методы

Метод Описание
__construct ( FileManager $ConfigFileManager, Framework $Framework ) Construct a new permission manager
createRules ( ) : array Create rules for a new permission
destroyPermission ( string $condition ) : boolean | array Destroys a permission by retrieving current config contents and unsetting the key (condition) then saving the updated contents
storePermission ( array $input ) : boolean | array Validates and updates a permission with the given input
updatePermission ( array $input ) : boolean Validates and updates a permission with the given input
updateRules ( ) : array Create rules to edit a permission

Защищенные методы

Метод Описание
cleanInput ( array &$input ) : void Recursively walks the data received from the form and cleans all duplicate fields and empty values
includeRedirect ( array $input, array &$permission ) : void Recursively walks the data received from the form and cleans all duplicate fields and empty values

Описание методов

__construct() публичный Метод

Construct a new permission manager
public __construct ( FileManager $ConfigFileManager, Framework $Framework )
$ConfigFileManager Devise\Support\Config\FileManager
$Framework Devise\Support\Framework

cleanInput() защищенный Метод

Recursively walks the data received from the form and cleans all duplicate fields and empty values
protected cleanInput ( array &$input ) : void
$input array
Результат void

createRules() публичный Метод

Create rules for a new permission
public createRules ( ) : array
Результат array

destroyPermission() публичный Метод

Destroys a permission by retrieving current config contents and unsetting the key (condition) then saving the updated contents
public destroyPermission ( string $condition ) : boolean | array
$condition string
Результат boolean | array | array

includeRedirect() защищенный Метод

Recursively walks the data received from the form and cleans all duplicate fields and empty values
protected includeRedirect ( array $input, array &$permission ) : void
$input array
$permission array
Результат void

storePermission() публичный Метод

Validates and updates a permission with the given input
public storePermission ( array $input ) : boolean | array
$input array
Результат boolean | array | array

updatePermission() публичный Метод

Validates and updates a permission with the given input
public updatePermission ( array $input ) : boolean
$input array
Результат boolean

updateRules() публичный Метод

Create rules to edit a permission
public updateRules ( ) : array
Результат array

Описание свойств

$ConfigFileManager защищенное свойство

protected $ConfigFileManager

$errors публичное свойство

Errors are kept in an array and can be used later if validation fails and we want to know why
public array $errors
Результат array

$message публичное свойство

This is a message that we can store why the validation failed
public string $message
Результат string

$messages публичное свойство

Validation messages
public $messages