|
static | create ($duration=30, $user_id=null, bool $return_object=false) |
|
static | isValid ($token, $user_id=null) |
|
static | tableScheme ($db_table) |
|
static | expireTableScheme () |
|
static | exists ($id) |
|
static | countBySql ($sql='1', $params=[]) |
|
static | create ($data) |
|
static | build ($data, $is_new=true) |
|
static | buildExisting ($data) |
|
static | import ($data) |
|
static | findBySQL ($sql, $params=[]) |
|
static | findOneBySQL ($where, $params=[]) |
|
static | findThru ($foreign_key_value, $options) |
|
static | findEachBySQL ($callable, $sql, $params=[]) |
|
static | findMany ($pks=[], $order='', $order_params=[]) |
|
static | findEachMany ($callable, $pks=[], $order='', $order_params=[]) |
|
static | findAndMapBySQL ($callable, $where, $params=[]) |
|
static | findAndMapMany ($callable, $pks=[], $order='', $order_params=[]) |
|
static | deleteBySQL ($where, $params=[]) |
|
static | toObject ($id_or_object) |
|
static | __callStatic (string $name, array $arguments) |
|
|
const | ID_SEPARATOR = '_' |
|
static | $schemes = null |
|
| _getId ($field) |
|
| _setId ($field, $value) |
|
| _getAdditionalValueFromRelation ($field) |
|
| _setAdditionalValueFromRelation ($field, $value) |
|
| _getAdditionalValue ($field) |
|
| _setAdditionalValue ($field, $value) |
|
| parseRelationOptions ($type, $name, $options) |
|
| storeRelations ($only_these=null) |
|
| deleteRelations () |
|
| initializeContent () |
|
| applyCallbacks ($type) |
|
| cbNotificationMapper ($cb_type) |
|
| cbAfterInitialize ($cb_type) |
|
| setSerializedValue ($field, $value) |
|
| setI18nValue ($field, $value) |
|
| $content = [] |
|
| $content_db = [] |
|
| $is_new = true |
|
| $is_deleted = false |
|
| $relations = [] |
|
| $additional_data = [] |
|
static | $config = [] |
|
static | $reserved_slots = ['value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id'] |
|
static | $performs_batch_operation = false |
|
◆ configure()
static configure |
( |
|
$config = [] | ) |
|
|
staticprotected |
Configures the model
- Parameters
-
◆ create()
static create |
( |
|
$duration = 30 , |
|
|
|
$user_id = null , |
|
|
bool |
$return_object = false |
|
) |
| |
|
static |
Creates a new token.
- Parameters
-
integer | $duration | Lifetime of the token |
mixed | $user_id | Optional id of the user (defaults to current user) |
bool | $return_object | Return the actual token object if true, only the token otherwise (default) |
- Returns
- string|Token the token
◆ isExpired()
Returns whether the token is expired
- Returns
- boolean
◆ isValid()
static isValid |
( |
|
$token, |
|
|
|
$user_id = null |
|
) |
| |
|
static |
Checks if a token is valid (for a given user).
Based on the number of paremters this either returns the id of the user the token belongs to or a boolean if the id of a user was already given.
- Parameters
-
string | $token | Token to check |
mixed | $user_id | Optional id of a user |
- Returns
- mixed User id of none was given or boolean
The documentation for this class was generated from the following file: