get_id()
Returns the drivers unique id. This can be used to identify the driver, or to select a specific driver instance.
Static | No |
---|---|
パラメータ | None |
返り値 | The drivers id string. |
例 |
|
The Auth package provides a standardized interface for authentication in Fuel. This allows our users to write their own drivers and easily integrate a new driver to work with old code by keeping the basic methods consistent.
This driver is the base class for all Auth group drivers. It is defined as an abstract class which contains all methods generic to all group drivers, and abstract method definitions for all methods any group driver MUST implement.
A group driver can load additional drivers that it depends on. Generally, these are ACL drivers. But your implementation could introduce and use custom driver types as well. To do so, add this structure to your driver class:
// autoload the SimpleAcl acl driver when loading this group driver
protected $config = array(
'drivers' => array('acl' => array('SimpleAcl'))
);
Generic methods are defined in the group base driver, and are available to all Auth group drivers through extension. These methods provide functions to interact with groups, and to check for access.
The methods defined in the classes but not documented here are used internally, and should not be called directly.
Returns the drivers unique id. This can be used to identify the driver, or to select a specific driver instance.
Static | No |
---|---|
パラメータ | None |
返り値 | The drivers id string. |
例 |
|
Sets a driver configuration value.
Static | No | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
パラメータ |
|
|||||||||
返り値 | void | |||||||||
例 |
|
Gets a driver configuration value.
Static | No | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
パラメータ |
|
|||||||||
返り値 | mixed | |||||||||
例 |
|
The has_access method uses the defined ACL drivers to check the users access according to the given condition.
Static | No | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
パラメータ |
|
||||||||||||
返り値 | boolean, true if access was granted, false if not. | ||||||||||||
例 |
|
Every group driver you develop MUST provide all of these methods, and the MUST return the values documented here.
Checks if user is a member of the given group in either all loaded Group drivers or just those specified as the 2nd parameter.
Static | Yes | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
パラメータ |
|
|||||||||
返り値 | bool, whether one of the (given) drivers had the current user registered as a member | |||||||||
例 |
|
Get the display name of the given group name.
Static | Yes | ||||||
---|---|---|---|---|---|---|---|
パラメータ |
|
||||||
返り値 | mixed, the retrieved group display name, or false if the given group does not exist. | ||||||
例 |
|