Member extends Collection
FinalYes
Table of Contents
Methods
- __construct() : mixed
- Creates object.
- addError() : mixed
- addException() : mixed
- clear() : mixed
- containsId() : mixed
- containsKey() : mixed
- count() : int
- Count elements of an object
- delete() : $this
- Delete several items by condition
- deleteOne() : mixed
- export() : mixed
- find() : static
- Find items by condition. A new collection of the same class will be returned
- findOne() : mixed
- first() : mixed
- get() : null
- Returns item by it`s value (key). Keys MAY NOT be numeric, so it is NOT an order-correct query
- getClass() : mixed
- getErrors() : mixed
- getItemById() : mixed
- getItemIndexById() : mixed
- getIterator() : Traversable
- getKeys() : mixed
- getUserIds() : mixed
- isA() : mixed
- isEmpty() : bool
- Returns true if the dictionary is empty.
- isSuccess() : mixed
- last() : mixed
- nth() : mixed
- offsetExists() : bool
- Whether a offset exists
- offsetGet() : mixed
- Returns instance field. If none was loaded before, upload it.
- offsetSet() : void
- Offset to set
- offsetUnset() : void
- Offset to unset
- push() : mixed
- set() : mixed
- sort() : static
- Sorts this collection by $conditions
- toArray() : array<string|int, mixed>
- Returns the values as an array.
- unShift() : mixed
- update() : mixed
- updateOne() : mixed
- updateValuePart() : mixed
Methods
__construct()
Creates object.
public
__construct([array<string|int, mixed> $values = null ]) : mixed
Parameters
- $values : array<string|int, mixed> = null
addError()
public
addError(mixed $code, mixed $message[, mixed $type = Error::TYPE_FATAL ][, mixed $data = null ]) : mixed
Parameters
- $code : mixed
- $message : mixed
- $type : mixed = Error::TYPE_FATAL
- $data : mixed = null
addException()
public
addException(mixed $e[, string $message = '' ][, array<string|int, mixed> $settings = array() ]) : mixed
Parameters
- $e : mixed
- $message : string = ''
- $settings : array<string|int, mixed> = array()
clear()
public
clear() : mixed
containsId()
public
containsId(mixed $id) : mixed
Parameters
- $id : mixed
containsKey()
public
containsKey(mixed $key) : mixed
Parameters
- $key : mixed
count()
Count elements of an object
public
count() : int
Return values
intdelete()
Delete several items by condition
public
delete(mixed $conditions[, int $limit = -1 ]) : $this
Parameters
- $conditions : mixed
- $limit : int = -1
Return values
$thisdeleteOne()
public
deleteOne(array<string|int, mixed> $conditions) : mixed
Parameters
- $conditions : array<string|int, mixed>
export()
public
export([mixed $exporter = null ]) : mixed
Parameters
- $exporter : mixed = null
find()
Find items by condition. A new collection of the same class will be returned
public
find([array<string|int, mixed> $conditions = array() ][, array<string|int, mixed>|int $limit = -1 ]) : static
Parameters
- $conditions : array<string|int, mixed> = array()
- $limit : array<string|int, mixed>|int = -1
Return values
staticfindOne()
public
findOne([mixed $conditions = array() ]) : mixed
Parameters
- $conditions : mixed = array()
first()
public
first() : mixed
get()
Returns item by it`s value (key). Keys MAY NOT be numeric, so it is NOT an order-correct query
public
get(mixed $name) : null
Parameters
- $name : mixed
Return values
nullgetClass()
public
static getClass() : mixed
getErrors()
public
getErrors() : mixed
getItemById()
public
getItemById(mixed $id) : mixed
Parameters
- $id : mixed
getItemIndexById()
public
getItemIndexById(mixed $id) : mixed
Parameters
- $id : mixed
getIterator()
public
getIterator() : Traversable
Return values
TraversablegetKeys()
public
getKeys() : mixed
getUserIds()
public
getUserIds() : mixed
isA()
public
static isA(mixed $object) : mixed
Parameters
- $object : mixed
isEmpty()
Returns true if the dictionary is empty.
public
isEmpty() : bool
Return values
boolisSuccess()
public
isSuccess() : mixed
last()
public
last() : mixed
nth()
public
nth(mixed $num) : mixed
Parameters
- $num : mixed
offsetExists()
Whether a offset exists
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
booloffsetGet()
Returns instance field. If none was loaded before, upload it.
public
offsetGet(string $offset) : mixed
Parameters
- $offset : string
Attributes
- #[ReturnTypeWillChange]
offsetSet()
Offset to set
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
Offset to unset
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
push()
public
push(mixed $data) : mixed
Parameters
- $data : mixed
set()
public
set(array<string|int, mixed> $values) : mixed
Parameters
- $values : array<string|int, mixed>
sort()
Sorts this collection by $conditions
public
sort([array<string|int, mixed> $conditions = array() ]) : static
Parameters
- $conditions : array<string|int, mixed> = array()
-
todo: only one sort parameter supported todo: implement option "nulls first\last" to be able to preserve original order for items that do not have todo: criteria offset at all
Return values
statictoArray()
Returns the values as an array.
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>unShift()
public
unShift(mixed $data) : mixed
Parameters
- $data : mixed
update()
public
update(array<string|int, mixed> $conditions, mixed $data[, mixed $limit = -1 ]) : mixed
Parameters
- $conditions : array<string|int, mixed>
- $data : mixed
- $limit : mixed = -1
updateOne()
public
updateOne(array<string|int, mixed> $conditions, mixed $data) : mixed
Parameters
- $conditions : array<string|int, mixed>
- $data : mixed
updateValuePart()
public
updateValuePart(mixed $valuePart, mixed $valueType, Item $item) : mixed
Parameters
- $valuePart : mixed
- $valueType : mixed
- $item : Item