Leaf PHP

Config
in package

Config for Leaf Auth -------- Set/Get config to match your app

Tags
since
3.0.0
version
0.1.0

Table of Contents

Properties

$config  : array<string|int, mixed>
configuration for Leaf Auth
$userCache  : array<string|int, mixed>
Additional user information for cache

Methods

get()  : mixed
Get Leaf Auth config
getUserCache()  : mixed
Get user cache
overwrite()  : void
Overwrite Leaf Auth config
set()  : void
Set Leaf Auth config
setUserCache()  : void
Set user cache

Properties

$config

configuration for Leaf Auth

protected static array<string|int, mixed> $config = ['id.key' => 'id', 'db.table' => 'users', 'roles.key' => 'leaf_auth_user_roles', 'timestamps' => true, 'timestamps.format' => 'YYYY-MM-DD HH:mm:ss', 'password.encode' => null, 'password.verify' => null, 'password.key' => 'password', 'unique' => ['email', 'username'], 'hidden' => ['field.id', 'field.password'], 'session' => false, 'session.lifetime' => 60 * 60 * 24, 'session.cookie' => ['secure' => true, 'httponly' => true, 'samesite' => 'lax'], 'token.lifetime' => null, 'token.secret' => '@_leaf$0Secret!', 'messages.loginParamsError' => 'Incorrect credentials!', 'messages.loginPasswordError' => 'Password is incorrect!']

$userCache

Additional user information for cache

protected static array<string|int, mixed> $userCache = []

Methods

get()

Get Leaf Auth config

public static get([mixed $key = null ]) : mixed
Parameters
$key : mixed = null

getUserCache()

Get user cache

public static getUserCache([mixed $key = null ]) : mixed
Parameters
$key : mixed = null

overwrite()

Overwrite Leaf Auth config

public static overwrite(mixed $config) : void
Parameters
$config : mixed

set()

Set Leaf Auth config

public static set(mixed $config) : void
Parameters
$config : mixed

setUserCache()

Set user cache

public static setUserCache(mixed $key, mixed $value) : void
Parameters
$key : mixed
$value : mixed

        
On this page

Search results