result_interface
interface result_interface implements Countable, IteratorAggregate
| internal |
Interface for immutable result container returned by the Query Engine.
Methods
No description
Returns total number of items matching the query, ignoring pagination.
Indicates whether the items are stdClass objects instead of Domain objects.
Indicates whether the result is paginated.
Returns current page number.
Returns number of items per page.
Returns total number of pages.
Returns the first item or null.
Returns the last item or null.
Returns true when no items were returned.
Returns true when at least one item exists.
Convert to array for JSON or external APIs.
Details
at line 37
array
items()
No description
at line 44
int
total()
Returns total number of items matching the query, ignoring pagination.
at line 51
bool
is_std_class()
Indicates whether the items are stdClass objects instead of Domain objects.
at line 58
bool
is_paginated()
Indicates whether the result is paginated.
at line 65
int|null
page()
Returns current page number.
at line 72
int|null
perpage()
Returns number of items per page.
at line 80
int
pages()
Returns total number of pages.
When pagination is disabled, always returns 1.
at line 87
mixed
first()
Returns the first item or null.
at line 94
mixed
last()
Returns the last item or null.
at line 101
bool
is_empty()
Returns true when no items were returned.
at line 108
bool
is_not_empty()
Returns true when at least one item exists.
at line 116
array
to_array()
Convert to array for JSON or external APIs.
Directly returns internal resolved dataset.