PHP Class Locker\Repository\Statement\EloquentInserter

Inheritance: extends EloquentReader, implements Locker\Repository\Statement\Inserter
Datei anzeigen Open project: learninglocker/learninglocker

Public Methods

Method Description
compareForConflict ( stdClass $statement_x, stdClass $statement_y ) Compares two statements.
insert ( array $statements, StoreOptions $opts ) Inserts statements with the given options.

Private Methods

Method Description
checkForConflict ( stdClass $statement, StoreOptions $opts ) Checks for a duplicate statement with the given options.
constructModel ( stdClass $statement, StoreOptions $opts ) : [String Constructs a model from the given statement and options.
insertModels ( array $models, StoreOptions $opts ) Inserts models with the given options.
matchableStatement ( stdClass $statement ) : stdClass Decodes the encoded statement.

Method Details

compareForConflict() public method

Throws Exceptions\Conflict if the two statements match.
public compareForConflict ( stdClass $statement_x, stdClass $statement_y )
$statement_x stdClass
$statement_y stdClass

insert() public method

Inserts statements with the given options.
public insert ( array $statements, StoreOptions $opts )
$statements array
$opts StoreOptions