RavSystem API docs

RequestRepository extends BaseRepository
in package
implements IRequestRepository

Interfaces, Classes, Traits and Enums

IRequestRepository

Table of Contents

$cache  : RepositoryCache
$configTable  : string
$db  : IDatabase
$params  : array<string|int, mixed>
$SQL  : string
$sql  : string
SQL statement
$SQLlimit  : string
$SQLorder  : string
$SQLwhere  : string
$table  : string
Database table name
$pagination  : Pagination
__construct()  : mixed
all()  : array<string|int, Model>
reads all results of query
byId()  : Model
Reads specific object by provided id
create()  : void
Creates HTTP request log
delete()  : void
Deletes provided object
one()  : Model
gets one item from collection
orderBy()  : IRepository
Enables ordering on results
setPagination()  : IRepository
Sets pagination feature enabled
where()  : IRepository
Builds WHERE clause of query with provided data of array
whereLIKE()  : IRequestRepository
search entires where search params are LIKE given values
executeQuery()  : array<string|int, mixed>
newItem()  : Request
Creates new Domain object from provided data

Properties

$SQLorder

protected string $SQLorder = ' ORDER BY `created` DESC'

Methods

__construct()

public __construct(ContainerInterface $di) : mixed
Parameters
$di : ContainerInterface
Return values
mixed

all()

reads all results of query

public all() : array<string|int, Model>
Return values
array<string|int, Model>

byId()

Reads specific object by provided id

public byId(int $id) : Model
Parameters
$id : int
Return values
Model

create()

Creates HTTP request log

public create(ServerRequestInterface $request) : void
Parameters
$request : ServerRequestInterface
Return values
void

delete()

Deletes provided object

public delete(Model $object) : void
Parameters
$object : Model
Return values
void

orderBy()

Enables ordering on results

public orderBy(string $name[, string $direction = 'DESC' ]) : IRepository
Parameters
$name : string
$direction : string = 'DESC'
Return values
IRepository

where()

Builds WHERE clause of query with provided data of array

public where(array<string|int, mixed> $searchParams) : IRepository
Parameters
$searchParams : array<string|int, mixed>
Return values
IRepository

executeQuery()

protected executeQuery() : array<string|int, mixed>
Return values
array<string|int, mixed>

newItem()

Creates new Domain object from provided data

protected newItem(array<string|int, mixed> $data) : Request
Parameters
$data : array<string|int, mixed>
Return values
Request

Search results