Methods summary
public
integer|null
|
#
GetId( )
User unique id, representing primary key in database
or sequence number in system config.
Example: 0 | 1 | 2...
User unique id, representing primary key in database
or sequence number in system config.
Example: 0 | 1 | 2...
Returns
integer|null
|
public
MvcCore\Ext\Auths\Basics\Role
|
#
SetId( integer|null $id )
Set user unique id, representing primary key in database
or sequence number in system config.
Example: 0 | 1 | 2...
Set user unique id, representing primary key in database
or sequence number in system config.
Example: 0 | 1 | 2...
Parameters
Returns
|
public
boolean
|
#
IsActive( )
Get user active state boolean. TRUE for active, FALSE otherwise.
This function is only alias for $user->GetActive(); .
Get user active state boolean. TRUE for active, FALSE otherwise.
This function is only alias for $user->GetActive(); .
Returns
boolean
|
public
boolean
|
#
GetActive( )
Get user active state boolean. TRUE for active, FALSE otherwise.
Get user active state boolean. TRUE for active, FALSE otherwise.
Returns
boolean
|
public
MvcCore\Ext\Auths\Basics\Role
|
#
SetActive( $active )
Set user active state boolean. TRUE for active, FALSE otherwise.
Set user active state boolean. TRUE for active, FALSE otherwise.
Returns
|
public
boolean
|
#
GetPermission( string $permissionName )
Get TRUE if given permission string is allowed for user or role. FALSE otherwise.
Get TRUE if given permission string is allowed for user or role. FALSE otherwise.
Parameters
Returns
boolean
|
public
MvcCore\Ext\Auths\Basics\Role
|
#
SetPermission( string $permissionName, boolean $allow = TRUE )
Set $permissionName string with $allow boolean to allow
or to disallow permission (with $allow = FALSE ) for user or role.
Set $permissionName string with $allow boolean to allow
or to disallow permission (with $allow = FALSE ) for user or role.
Parameters
- $permissionName
- Strings describing what is allowed/disallowed to do for user or role.
- $allow
TRUE by default.
Returns
|
public
string[]
&
|
#
GetPermissions( )
Get array of strings describing what is allowed to do for user or role.
Get array of strings describing what is allowed to do for user or role.
Returns
string[]
|
public
MvcCore\Ext\Auths\Basics\Role
|
#
SetPermissions( string|string[] $permissions )
Set array of strings describing what is allowed to do for user or role.
Set array of strings describing what is allowed to do for user or role.
Parameters
- $permissions
- The permissions string, separated by comma character or array of strings.
Returns
|
public
string
|
#
GetName( )
Get unique role name.
Example: "management" | "editor" | "quest"
Get unique role name.
Example: "management" | "editor" | "quest"
Returns
string
|
public
MvcCore\Ext\Auths\Basics\Role
|
#
SetName( string $name )
Set unique role name.
Example: "management" | "editor" | "quest"
Set unique role name.
Example: "management" | "editor" | "quest"
Parameters
Returns
|
public
boolean
|
#
IsAllowed( string|string[] $permissionNameOrNames, boolean $allPermissionsRequired = TRUE )
Get TRUE if given permission string(s) is/are (all or some) allowed for user or user role.
FALSE otherwise. Permission name could contain asterisk char * in any place.
Get TRUE if given permission string(s) is/are (all or some) allowed for user or user role.
FALSE otherwise. Permission name could contain asterisk char * in any place.
Parameters
- $permissionNameOrNames
- $allPermissionsRequired
TRUE by default.
Returns
boolean
|
public
MvcCore\Ext\Auths\Basics\Role
|
#
GetByName( string $roleName )
Get role instance from application roles list. It could be database or any other custom resource.
Get role instance from application roles list. It could be database or any other custom resource.
Parameters
- $roleName
- $name Role unique name.
Returns
Throws
RuntimeException
|