Devise
Class

Devise\Users\Permissions\RuleList

class RuleList

Class RuleList maintains list of built-in and user defined functions (in permissions-conditions config) which can be checked using DeviseUser Facade.

Properties

array $closures Closures are kept in an array and can be used to execute user-defined condition(s) permissions/closures by key
array $rules Rules are a list of built-in methods in this class which are kept in an array; They are used to find and execute methods by name

Methods

__construct(User $User, Framework $Framework)

Construct a new RuleList

Void __call(string $method, array $arguments = array())

Handle execution of the different types of methods

boolean isLoggedIn()

Is user logged in system

boolean isInGroup(string $groupname)

Checks if user is in a group

boolean isNotInGroup(string $groupname)

Check user is not in a group

boolean hasUserName(string $username)

Determine if a username or email is used for application login.

boolean hasEmail(string $email)

Check if email field equals specified email

boolean hasFieldValue(string $field, string $value)

Check if database field is equal to the specified value

[type] showDeviseSpan($key, $collection)

Determines if we should show the devise span

Details

at line 57
public __construct(User $User, Framework $Framework)

Construct a new RuleList

Parameters

User $User
Framework $Framework

at line 72
public Void __call(string $method, array $arguments = array())

Handle execution of the different types of methods

Parameters

string $method Name of function/method
array $arguments Any arguments required by method

Return Value

Void | Exception

Exceptions

Exception

at line 99
public boolean isLoggedIn()

Is user logged in system

Return Value

boolean

at line 110
public boolean isInGroup(string $groupname)

Checks if user is in a group

Parameters

string $groupname

Return Value

boolean

at line 130
public boolean isNotInGroup(string $groupname)

Check user is not in a group

Parameters

string $groupname

Return Value

boolean

at line 151
public boolean hasUserName(string $username)

Determine if a username or email is used for application login.

Then checks if username/email equals specified value

Parameters

string $username Handles username or email search

Return Value

boolean

at line 165
public boolean hasEmail(string $email)

Check if email field equals specified email

Parameters

string $email

Return Value

boolean

at line 177
public boolean hasFieldValue(string $field, string $value)

Check if database field is equal to the specified value

Parameters

string $field
string $value

Return Value

boolean

at line 194
public [type] showDeviseSpan($key, $collection)

Determines if we should show the devise span

Parameters

$key
$collection

Return Value

[type]