PHP Class League\FactoryMuffin\Stores\AbstractStore

Author: Graham Campbell ([email protected])
Author: Scott Robertson ([email protected])
Author: Anderson Ribeiro e Silva ([email protected])
Datei anzeigen Open project: zizaco/factory-muff Class Usage Examples

Protected Properties

Property Type Description
$methods string[] The underlying operational method names.

Public Methods

Method Description
deleteSaved ( ) : void Delete all the saved models.
isPending ( object $model ) : boolean Is the model waiting to be saved?
isSaved ( object $model ) : boolean Is the model saved?
markPending ( object $model ) : void Mark a model as waiting to be saved.
markSaved ( object $model ) : void Mark a model as saved.
pending ( ) : object[] Return an array of models waiting to be saved.
persist ( object $model ) : void Save the model to the database.
saved ( ) : object[] Return an array of saved models.

Protected Methods

Method Description
delete ( object $model ) : mixed Delete our object from the db.
save ( object $model ) : mixed Save our object to the db, and keep track of it.

Method Details

delete() abstract protected method

Delete our object from the db.
abstract protected delete ( object $model ) : mixed
$model object The model instance.
return mixed

deleteSaved() public method

Delete all the saved models.
public deleteSaved ( ) : void
return void

isPending() public method

Is the model waiting to be saved?
public isPending ( object $model ) : boolean
$model object The model instance.
return boolean

isSaved() public method

Is the model saved?
public isSaved ( object $model ) : boolean
$model object The model instance.
return boolean

markPending() public method

Mark a model as waiting to be saved.
public markPending ( object $model ) : void
$model object The model instance.
return void

markSaved() public method

Mark a model as saved.
public markSaved ( object $model ) : void
$model object The model instance.
return void

pending() public method

Return an array of models waiting to be saved.
public pending ( ) : object[]
return object[]

persist() public method

Save the model to the database.
public persist ( object $model ) : void
$model object The model instance.
return void

save() abstract protected method

Save our object to the db, and keep track of it.
abstract protected save ( object $model ) : mixed
$model object The model instance.
return mixed

saved() public method

Return an array of saved models.
public saved ( ) : object[]
return object[]

Property Details

$methods protected_oe property

The underlying operational method names.
protected string[] $methods
return string[]