PHP Class Devise\Users\Permissions\RuleList

Datei anzeigen Open project: devisephp/cms

Public Properties

Property Type Description
$closures array Closures are kept in an array and can be used to execute user-defined condition(s) permissions/closures by key
$rules array 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

Protected Properties

Property Type Description
$Framework Devise\Support\Framework Framework components being used from Laravel's framework
$User User User model to fetch database table "users"
$isLoggedIn boolean Is this user logged in? Cache the value on this object for performance reasons

Public Methods

Method Description
__call ( string $method, array $arguments = [] ) : Void | Exceptio\Exception Handle execution of the different types of methods
__construct ( DvsUser $User, Framework $Framework ) Construct a new RuleList

Protected Methods

Method Description
hasEmail ( string $email ) : boolean Check if email field equals specified email
hasFieldValue ( string $field, string $value ) : boolean Check if database field is equal to the specified value
hasName ( string $name ) : boolean Check if name field equals specified name value
hasUserName ( string $username ) : boolean Check if username equals specified username value
isInGroup ( string $groupname ) : boolean Checks if user is in a group
isInGroups ( [type] $groupname ) : boolean Check to see if user is in all groups
isLoggedIn ( ) : boolean Is user logged in system
isNotInGroup ( string $groupname ) : boolean Check user is not in a group
isNotInGroups ( [type] $groupname ) : boolean Check to see if user is not in all the groups
isNotLoggedIn ( ) : boolean Is user not logged in system
showDeviseSpan ( [type] $key, $collection ) : [type] Determines if we should show the devise span

Method Details

__call() public method

Handle execution of the different types of methods
public __call ( string $method, array $arguments = [] ) : Void | Exceptio\Exception
$method string Name of function/method
$arguments array Any arguments required by method
return Void | Exceptio\Exception | Exception

__construct() public method

Construct a new RuleList
public __construct ( DvsUser $User, Framework $Framework )
$User DvsUser
$Framework Devise\Support\Framework

hasEmail() protected method

Check if email field equals specified email
protected hasEmail ( string $email ) : boolean
$email string
return boolean

hasFieldValue() protected method

Check if database field is equal to the specified value
protected hasFieldValue ( string $field, string $value ) : boolean
$field string
$value string
return boolean

hasName() protected method

Check if name field equals specified name value
protected hasName ( string $name ) : boolean
$name string
return boolean

hasUserName() protected method

Check if username equals specified username value
protected hasUserName ( string $username ) : boolean
$username string
return boolean

isInGroup() protected method

you can pass multiple groups in here isInGroup('group1', 'group2') means the user is in either 'group1' or 'group2'
protected isInGroup ( string $groupname ) : boolean
$groupname string
return boolean

isInGroups() protected method

isInGroup('group1', 'group2') means user is in both 'group1' AND 'group1'
protected isInGroups ( [type] $groupname ) : boolean
$groupname [type]
return boolean

isLoggedIn() protected method

Is user logged in system
protected isLoggedIn ( ) : boolean
return boolean

isNotInGroup() protected method

Check user is not in a group
protected isNotInGroup ( string $groupname ) : boolean
$groupname string
return boolean

isNotInGroups() protected method

Check to see if user is not in all the groups
protected isNotInGroups ( [type] $groupname ) : boolean
$groupname [type]
return boolean

isNotLoggedIn() protected method

Is user not logged in system
protected isNotLoggedIn ( ) : boolean
return boolean

showDeviseSpan() protected method

Determines if we should show the devise span
protected showDeviseSpan ( [type] $key, $collection ) : [type]
$key [type]
return [type]

Property Details

$Framework protected_oe property

Framework components being used from Laravel's framework
protected Framework,Devise\Support $Framework
return Devise\Support\Framework

$User protected_oe property

User model to fetch database table "users"
protected User $User
return User

$closures public_oe property

Closures are kept in an array and can be used to execute user-defined condition(s) permissions/closures by key
public array $closures
return array

$isLoggedIn protected_oe property

Is this user logged in? Cache the value on this object for performance reasons
protected bool $isLoggedIn
return boolean

$rules public_oe property

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
public array $rules
return array