Leaf PHP

Model
in package

Auth User Model ---- Tiny model class for the user. Provides bare minimum functionality for user and user data manipulation.

Tags
since
3.0.0

Table of Contents

Properties

$dataToSave  : array<string|int, mixed>
User data to save
$db  : Db
DB connection
$table  : string
DB table name
$user  : User
User Information

Methods

__call()  : mixed
__construct()  : mixed
__set()  : mixed
create()  : bool
Create a new model resource
delete()  : Db
Delete a model resource
save()  : bool
Save a model resource
table()  : Db
Get a model resource
update()  : Db
Update a model resource

Properties

$dataToSave

User data to save

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

$table

DB table name

protected string $table

Methods

__call()

public __call(mixed $name, mixed $arguments) : mixed
Parameters
$name : mixed
$arguments : mixed

__construct()

public __construct(mixed $data) : mixed
Parameters
$data : mixed

__set()

public __set(mixed $name, mixed $value) : mixed
Parameters
$name : mixed
$value : mixed

create()

Create a new model resource

public create(array<string|int, mixed> $data) : bool
Parameters
$data : array<string|int, mixed>

Data to be inserted

Return values
bool

delete()

Delete a model resource

public delete() : Db
Return values
Db

save()

Save a model resource

public save() : bool
Return values
bool

table()

Get a model resource

public table([string $columns = '*' ]) : Db
Parameters
$columns : string = '*'

Columns to search by separated by commas or *

Return values
Db

update()

Update a model resource

public update(array<string|int, mixed> $data) : Db
Parameters
$data : array<string|int, mixed>

Data to be updated

Return values
Db

        
On this page

Search results