Commit ba99438c authored by eileen's avatar eileen 🎱
Browse files

Remove reference to standard function & direct to php docs

Note the count function makes sense to document as it is not standard in our implementation
parent 90d3f9fa
......@@ -32,7 +32,10 @@ Consider these samples with commonly-used actions and parameters for the `Contac
The API returns an array, with each item representing one record (also an array).
In PHP, this output is contained in an ArrayObject, which can be accessed like an array using e.g. `$result[0]` or `foreach ($result as ...)`.
It also has the following methods:
See the [php docs](https://www.php.net/manual/en/class.arrayobject.php) for a full list of methods ArrayObjects support
It also has the following methods in addition to or overriding the base ArrayObject:
- `$result->first()`: returns the first item, or NULL if not found.
- `$result->single()`: returns a single item, or throws an exception if not exactly one item was returned.
......@@ -41,7 +44,7 @@ It also has the following methods:
- `$result->indexBy($field)`: reindexes the array by the value of a field.
- `$result->column($field)`: flattens the array, discarding all but a single field (call this second if using in conjunction with `indexBy` to create a key=>value array).
- `$result->count()`: get the total number of results. See note below on use with LIMIT.
- `$result->getArrayCopy()`: convert the object to a simple array.
!!! Getting Full Count While Using LIMIT
Sometimes you want to limit the number of results returned (e.g. when using a pager)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment