PHP Class Locker\Repository\Lrs\EloquentRepository

Inheritance: extends Locker\Repository\Base\EloquentRepository, implements Locker\Repository\Lrs\Repository
Datei anzeigen Open project: learninglocker/learninglocker

Protected Properties

Property Type Description
$defaults
$model

Public Methods

Method Description
changeRole ( $id, $user_id, $role )
destroy ( String $lrs_id, array $opts ) : boolean Destroys the model with the given ID and options.
getLrsMember ( $user_id )
getLrsOwned ( $user_id )
getStatementCount ( $lrs_id = null ) Get a statement count, either for an LRS or for the entire site if no lrs_id passed
index ( array $opts ) : [Model] Gets all of the available models with the options.
removeUser ( $id, $user_id )

Protected Methods

Method Description
constructStore ( Model $model, array $data, array $opts ) : Model Constructs a store.
constructUpdate ( Model $model, array $data, array $opts ) : Model Constructs a update.
validateData ( array $data ) Validates data.
where ( array $opts ) : Jenssegers\Mongodb\Eloquent\Builder Constructs a query restricted by the given options.

Method Details

changeRole() public method

public changeRole ( $id, $user_id, $role )

constructStore() protected method

Constructs a store.
protected constructStore ( Model $model, array $data, array $opts ) : Model
$model Illuminate\Database\Eloquent\Model Model to be stored.
$data array
$opts array
return Illuminate\Database\Eloquent\Model

constructUpdate() protected method

Constructs a update.
protected constructUpdate ( Model $model, array $data, array $opts ) : Model
$model Illuminate\Database\Eloquent\Model Model to be updated.
$data array
$opts array
return Illuminate\Database\Eloquent\Model

destroy() public method

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

getLrsMember() public method

public getLrsMember ( $user_id )

getLrsOwned() public method

public getLrsOwned ( $user_id )

getStatementCount() public method

Get a statement count, either for an LRS or for the entire site if no lrs_id passed
public getStatementCount ( $lrs_id = null )

index() public method

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

removeUser() public method

public removeUser ( $id, $user_id )

validateData() protected method

Validates data.
protected validateData ( array $data )
$data array

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

Property Details

$defaults protected_oe property

protected $defaults

$model protected_oe property

protected $model