PHP Класс Locker\Repository\Base\EloquentRepository

Наследование: implements Locker\Repository\Base\Repository
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Описание методов

constructStore() абстрактный защищенный метод

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

constructUpdate() абстрактный защищенный метод

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

destroy() публичный метод

Destroys the model with the given ID and options.
public destroy ( String $id, array $opts ) : boolean
$id String ID to match.
$opts array
Результат boolean

fire() защищенный метод

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() защищенный метод

Formats the model(s) before returning.
protected format ( Model $model ) : Model
$model Illuminate\Database\Eloquent\Model
Результат Illuminate\Database\Eloquent\Model

index() публичный метод

Gets all of the available models with the options.
public index ( array $opts ) : [Model]
$opts array
Результат [Model]

show() публичный метод

Gets the model with the given ID and options.
public show ( String $id, array $opts ) : Model
$id String ID to match.
$opts array
Результат Illuminate\Database\Eloquent\Model

store() публичный метод

Creates a new model.
public store ( array $data, array $opts ) : Model
$data array
$opts array
Результат Illuminate\Database\Eloquent\Model

update() публичный метод

Updates an existing model.
public update ( String $id, array $data, array $opts ) : Model
$id String ID to match.
$data array
$opts array
Результат Illuminate\Database\Eloquent\Model

where() защищенный метод

Constructs a query restricted by the given options.
protected where ( array $opts ) : Jenssegers\Mongodb\Eloquent\Builder
$opts array
Результат Jenssegers\Mongodb\Eloquent\Builder