PHP Class Devise\Users\UserHelper

Datei anzeigen Open project: devisephp/cms

Protected Properties

Property Type Description
$Framework Devise\Support\Framework Framework components being used from Laravel's framework
$RuleList Devise\Users\Permissions\RuleList RuleList keeps on-going list of built-in and added rules
$RuleManager Devise\Users\Permissions\RuleManager RuleManager manages rules
$UsersRepository UsersRepository UsersRepository fetches users and related data

Public Methods

Method Description
__call ( string $method, array $arguments ) : boolean Magic method to used to catch function(s) not found in RuleManager
__construct ( RuleManager $RuleManager, UsersRepository $UsersRepository, Framework $Framework )
checkConditions ( string | array $conditionNames, boolean $redirectOnFail = false ) : void Convenience function for handing a single condition name or an array of multiple condition names.
checkRule ( string $method, array $arguments = [] ) : void Checks for any user-defined rules/closures
currentUser ( ) : DvsUser Convenience function to get current user object
currentUserId ( ) : integer Convenience function to get current user's id

Private Methods

Method Description
checkConditionsArray ( array $conditionNamesArr = [], boolean $redirectOnFail = false ) : void Checks conditions by name and then evaulates results

Method Details

__call() public method

Magic method to used to catch function(s) not found in RuleManager
public __call ( string $method, array $arguments ) : boolean
$method string
$arguments array
return boolean

__construct() public method

public __construct ( RuleManager $RuleManager, UsersRepository $UsersRepository, Framework $Framework )
$RuleManager Devise\Users\Permissions\RuleManager
$UsersRepository UsersRepository
$Framework Devise\Support\Framework

checkConditions() public method

Convenience function for handing a single condition name or an array of multiple condition names.
public checkConditions ( string | array $conditionNames, boolean $redirectOnFail = false ) : void
$conditionNames string | array
$redirectOnFail boolean
return void

checkRule() public method

Checks for any user-defined rules/closures
public checkRule ( string $method, array $arguments = [] ) : void
$method string
$arguments array
return void

currentUser() public method

Convenience function to get current user object
public currentUser ( ) : DvsUser
return DvsUser

currentUserId() public method

Convenience function to get current user's id
public currentUserId ( ) : integer
return integer

Property Details

$Framework protected_oe property

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

$RuleList protected_oe property

RuleList keeps on-going list of built-in and added rules
protected RuleList,Devise\Users\Permissions $RuleList
return Devise\Users\Permissions\RuleList

$RuleManager protected_oe property

RuleManager manages rules
protected RuleManager,Devise\Users\Permissions $RuleManager
return Devise\Users\Permissions\RuleManager

$UsersRepository protected_oe property

UsersRepository fetches users and related data
protected UsersRepository,Devise\Users $UsersRepository
return UsersRepository