PHP Class Locker\Repository\Base\EloquentRepository

Inheritance: implements Locker\Repository\Base\Repository
Afficher le fichier Open project: learninglocker/learninglocker Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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

constructUpdate() abstract protected méthode

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

destroy() public méthode

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

fire() protected méthode

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 méthode

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

index() public méthode

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

show() public méthode

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

store() public méthode

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

update() public méthode

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

where() protected méthode

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