PHP 클래스 Devise\Users\Permissions\PermissionsManager

파일 보기 프로젝트 열기: devisephp/cms

공개 프로퍼티들

프로퍼티 타입 설명
$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

보호된 프로퍼티들

프로퍼티 타입 설명
$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