PHP Class Sleimanx2\Plastic\Persistence\EloquentPersistence

Afficher le fichier Open project: sleimanx2/plastic Class Usage Examples

Protected Properties

Свойство Type Description
$connection Sleimanx2\Plastic\Connection
$model Illuminate\Database\Eloquent\Model

Méthodes publiques

Méthode Description
__construct ( Connection $connection ) PersistenceAbstract constructor.
bulkDelete ( array | collection $collection = [] ) : mixed Bulk Delete a collection of Models.
bulkSave ( array | Collection $collection = [] ) : mixed Bulk save a collection Models.
delete ( ) : mixed Delete a model document.
getModel ( ) : Model Get the model to persist.
model ( Model $model ) Set the model to persist.
reindex ( array | Collection $collection = [] ) : mixed Reindex a collection of Models.
save ( ) : mixed Save a model instance.
update ( ) : mixed Update a model document.

Private Methods

Méthode Description
exitIfModelNotSet ( ) Function called when the model value is a required.

Method Details

__construct() public méthode

PersistenceAbstract constructor.
public __construct ( Connection $connection )
$connection Sleimanx2\Plastic\Connection

bulkDelete() public méthode

Bulk Delete a collection of Models.
public bulkDelete ( array | collection $collection = [] ) : mixed
$collection array | collection
Résultat mixed

bulkSave() public méthode

Bulk save a collection Models.
public bulkSave ( array | Collection $collection = [] ) : mixed
$collection array | Illuminate\Support\Collection
Résultat mixed

delete() public méthode

Delete a model document.
public delete ( ) : mixed
Résultat mixed

getModel() public méthode

Get the model to persist.
public getModel ( ) : Model
Résultat Illuminate\Database\Eloquent\Model

model() public méthode

Set the model to persist.
public model ( Model $model )
$model Illuminate\Database\Eloquent\Model

reindex() public méthode

Reindex a collection of Models.
public reindex ( array | Collection $collection = [] ) : mixed
$collection array | Illuminate\Support\Collection
Résultat mixed

save() public méthode

Save a model instance.
public save ( ) : mixed
Résultat mixed

update() public méthode

Update a model document.
public update ( ) : mixed
Résultat mixed

Property Details

$connection protected_oe property

protected Connection,Sleimanx2\Plastic $connection
Résultat Sleimanx2\Plastic\Connection

$model protected_oe property

protected Model,Illuminate\Database\Eloquent $model
Résultat Illuminate\Database\Eloquent\Model