\Localgod\Tick\StorageStorage

Tick storage interface

Interface for basic CRUD operation on storage.

Summary

Methods
Constants
get()
insert()
update()
remove()
exists()
count()
closeConnection()
getConnection()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

get()

get(string  $collection, array  $fields, array  $criterias, array  $order = array(), boolean  $direction = true, array  $limit = '', array  $offset = '') : array

Get entities in storage

Parameters

string $collection

Collection to search

array $fields

Properties to fetch

array $criterias

Criterias to search by

array $order

Order result

boolean $direction

Order direction

array $limit

Limit result

array $offset

Offset result

Returns

array —

Array with Associative arrays with fieldname=>value

insert()

insert(string  $collection, array  $data) : integer

Insert entity to storage

Parameters

string $collection

Collection to insert into

array $data

Associative array with fieldname=>value

Returns

integer —

Id of the object inserted

update()

update(string  $collection, array  $data, array  $criterias) : void

Update entity in storage

Parameters

string $collection

Collection to update

array $data

Associative array with fieldname=>value

array $criterias

Criteria of the object to update

remove()

remove(string  $collection, array  $criterias) : void

Remove entity from storage

Parameters

string $collection

Collection to search

array $criterias

Criteria of the object to remove

exists()

exists(string  $collection, array  $criterias) : boolean

Entity exists in storage

Parameters

string $collection

Collection to search

array $criterias

Criteria of the object to check for

Returns

boolean

count()

count(string  $collection, array  $criterias) : integer

Count the number of entities matching the given criteria

Parameters

string $collection

Collection to search

array $criterias

Criteria of the object to check for

Returns

integer

closeConnection()

closeConnection() : mixed

Close storage connection

Returns

mixed

getConnection()

getConnection() : mixed

Get storage connection

Returns

mixed