메소드 |
설명 |
|
__construct ( $array = [] ) |
|
|
add ( $model ) |
Add a model instance to this collection |
|
all ( ) |
Return a collection containing all model instances |
|
clear ( ) |
Remove all model instances from this collection |
|
count ( ) |
Countable interface
Makes count($collection) work |
|
current ( ) |
Makes a collection iterable like an array |
|
filter ( $args ) |
Return a collection containing model instances matching certian criteria |
|
get ( $args ) |
Create, fetch and return a single model instance with primary keys |
|
get_by ( $args ) |
Create, fetch and return a single model instances based on some unique keys |
|
key ( ) |
|
|
next ( ) |
|
|
offsetExists ( $offset ) |
ArrayAccess interface
Makes a collection object addressable like an array |
|
offsetGet ( $offset ) |
|
|
offsetSet ( $offset, $value ) |
|
|
offsetUnset ( $offset ) |
|
|
rewind ( ) |
|
|
to_json ( ) |
Return the results of calling to_json on all the model instances in this collection |
|
valid ( ) |
|
|
values ( ) |
Return specific values from all the model instances in this collection
TODO: Return all values if no params are given |
|