PHP Class Psecio\Gatekeeper\DataSource\Stub

Inheritance: extends Psecio\Gatekeeper\DataSource
Show file Open project: psecio/gatekeeper

Public Methods

Method Description
count ( Modler\Model $model, array $where = [] ) : boolean Return the number of entities in DB per condition or in general
create ( Modler\Model $model ) : boolean Create a new record with model given
delete ( Modler\Model $model ) : boolean Delete the record defined by the model data
fetch ( ) : boolean Fetch the data from the source
find ( Modler\Model $model, array $where = [] ) : boolean Find and populate a model based on the model type and where criteria
getLastError ( ) : string Return the last error from action taken on the datasource
save ( Modler\Model $model ) : boolean Save the given model
update ( Modler\Model $model ) : boolean Update the record for the given model

Method Details

count() public method

Return the number of entities in DB per condition or in general
public count ( Modler\Model $model, array $where = [] ) : boolean
$model Modler\Model Model instance
$where array
return boolean Success/fail of action

create() public method

Create a new record with model given
public create ( Modler\Model $model ) : boolean
$model Modler\Model Model instance
return boolean Success/fail of action

delete() public method

Delete the record defined by the model data
public delete ( Modler\Model $model ) : boolean
$model Modler\Model Model instance
return boolean Success/fail of action

fetch() public method

Fetch the data from the source
public fetch ( ) : boolean
return boolean Success/fail of action

find() public method

Find and populate a model based on the model type and where criteria
public find ( Modler\Model $model, array $where = [] ) : boolean
$model Modler\Model Model instance
$where array "Where" data to locate record
return boolean Success/fail of action

getLastError() public method

Return the last error from action taken on the datasource
public getLastError ( ) : string
return string Error string

save() public method

Save the given model
public save ( Modler\Model $model ) : boolean
$model Modler\Model Model instance
return boolean Success/fail of action

update() public method

Update the record for the given model
public update ( Modler\Model $model ) : boolean
$model Modler\Model Model instance
return boolean Success/fail of action