PHP Class LMongo\Eloquent\Collection

Inheritance: extends Illuminate\Support\Collection
Datei anzeigen Open project: navruzm/lmongo Class Usage Examples

Public Methods

Method Description
add ( mixed $item ) : Collection Add an item to the collection.
contains ( mixed $key ) : boolean Determine if a key exists in the collection.
find ( mixed $key, mixed $default = null ) : Model Find a model in the collection by key.
lists ( $value, string $key = null ) : array Get an array with the values of a given key.
load ( ) : void Load a set of relationships onto the collection.
modelKeys ( ) : array Get the array of primary keys

Method Details

add() public method

Add an item to the collection.
public add ( mixed $item ) : Collection
$item mixed
return Collection

contains() public method

Determine if a key exists in the collection.
public contains ( mixed $key ) : boolean
$key mixed
return boolean

find() public method

Find a model in the collection by key.
public find ( mixed $key, mixed $default = null ) : Model
$key mixed
$default mixed
return Model

lists() public method

Get an array with the values of a given key.
public lists ( $value, string $key = null ) : array
$key string
return array

load() public method

Load a set of relationships onto the collection.
public load ( ) : void
return void

modelKeys() public method

Get the array of primary keys
public modelKeys ( ) : array
return array