From d834623954abfd9113121569d97256657dce1dc5 Mon Sep 17 00:00:00 2001 From: Marco Date: Sat, 10 Mar 2018 02:51:27 +0100 Subject: [PATCH] Document methods 'getMap', 'getNames' and 'getValues' of class 'Role' --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d716be5..e6023a3 100644 --- a/README.md +++ b/README.md @@ -610,7 +610,15 @@ While the method `hasRole` takes exactly one role as its argument, the two metho \Delight\Auth\Role::TRANSLATOR; ``` -You can use any of these roles and ignore those that you don’t need. +You can use any of these roles and ignore those that you don’t need. The list above can also be retrieved programmatically, in one of three formats: + +```php +\Delight\Auth\Role::getMap(); +// or +\Delight\Auth\Role::getNames(); +// or +\Delight\Auth\Role::getValues(); +``` #### Permissions (or access rights, privileges or capabilities)