메소드 |
설명 |
|
__construct ( array $options = [] ) |
Instantiates the collection, sets param members as properties |
|
add ( object $model_data, array $options = [] ) : TerminusModel |
Adds a model to this collection |
|
all ( ) : TerminusModel[] |
Retrieves all models
TODO: Remove automatic fetching and make fetches explicit |
|
fetch ( array $options = [] ) : TerminusCollection |
Fetches model data from API and instantiates its model instances |
|
get ( string $id ) : TerminusModel |
Retrieves the model of the given ID |
|
getFilteredMemberList ( array $filters, string $key = 'id', string | array $value = 'name' ) : array |
Returns an array of data where the keys are the attribute $key and the
values are the attribute $value, filtered by the given array |
|
getMemberList ( string $key = 'id', string $value = 'name' ) : array |
Returns an array of data where the keys are the attribute $key and the
values are the attribute $value |
|
getUrl ( ) : string |
Get the listing URL for this collection |
|
ids ( ) : string[] |
List Model IDs |
|
listing ( string $key = 'id', mixed $value = 'name' ) : array |
Returns an array of data where the keys are the attribute $key and the
values are the attribute $value |
|