PHP Class Locker\Repository\Base\EloquentRepository

Inheritance: implements Locker\Repository\Base\Repository
Datei anzeigen Open project: learninglocker/learninglocker Class Usage Examples

Public Methods

Method Description
destroy ( String $id, array $opts ) : boolean Destroys the model with the given ID and options.
index ( array $opts ) : [Model] Gets all of the available models with the options.
show ( String $id, array $opts ) : Model Gets the model with the given ID and options.
store ( array $data, array $opts ) : Model Creates a new model.
update ( String $id, array $data, array $opts ) : Model Updates an existing model.

Protected Methods

Method Description
constructStore ( Model $model, array $data, array $opts )
constructUpdate ( Model $model, array $data, array $opts )
fire ( boolean $allow, String $event, array $opts, array $extra ) Fires an event.
format ( Model $model ) : Model Formats the model(s) before returning.
where ( array $opts ) : Jenssegers\Mongodb\Eloquent\Builder Constructs a query restricted by the given options.

Method Details

constructStore() abstract protected method

abstract protected constructStore ( Model $model, array $data, array $opts )
$model Illuminate\Database\Eloquent\Model
$data array
$opts array

constructUpdate() abstract protected method

abstract protected constructUpdate ( Model $model, array $data, array $opts )
$model Illuminate\Database\Eloquent\Model
$data array
$opts array

destroy() public method

Destroys the model with the given ID and options.
public destroy ( String $id, array $opts ) : boolean
$id String ID to match.
$opts array
return boolean

fire() protected method

Fires an event.
protected fire ( boolean $allow, String $event, array $opts, array $extra )
$allow boolean Determines if the event is allowed to fire.
$event String Name of the event to fire.
$opts array
$extra array

format() protected method

Formats the model(s) before returning.
protected format ( Model $model ) : Model
$model Illuminate\Database\Eloquent\Model
return Illuminate\Database\Eloquent\Model

index() public method

Gets all of the available models with the options.
public index ( array $opts ) : [Model]
$opts array
return [Model]

show() public method

Gets the model with the given ID and options.
public show ( String $id, array $opts ) : Model
$id String ID to match.
$opts array
return Illuminate\Database\Eloquent\Model

store() public method

Creates a new model.
public store ( array $data, array $opts ) : Model
$data array
$opts array
return Illuminate\Database\Eloquent\Model

update() public method

Updates an existing model.
public update ( String $id, array $data, array $opts ) : Model
$id String ID to match.
$data array
$opts array
return Illuminate\Database\Eloquent\Model

where() protected method

Constructs a query restricted by the given options.
protected where ( array $opts ) : Jenssegers\Mongodb\Eloquent\Builder
$opts array
return Jenssegers\Mongodb\Eloquent\Builder