Class CrudModel
Extends core model adding a basic set of methods triggering key events for crud operations
-
DSchoenbauer\Orm\Model
uses
Zend\EventManager\EventManagerAwareTrait (not available)
-
DSchoenbauer\Orm\CrudModel
Methods summary
public
array
|
#
create( array $data )
Process the addition of a new record
Process the addition of a new record
Parameters
Returns
array
Since
v1.0.0
|
public
array
|
#
fetch( integer $id )
Process the return of a single record
Process the return of a single record
Parameters
Returns
array
Since
v1.0.0
|
public
array
|
#
fetchAll( )
Process the return of a collection of data
Process the return of a collection of data
Returns
array
Since
v1.0.0
|
public
array
|
#
update( integer $id, array $data )
Process the update of data for a given id
Process the update of data for a given id
Parameters
- $id
- primary id number of the record to be updated
- $data
- an associative array of the data to be updated
Returns
array
Since
v1.0.0
|
public
boolean
|
#
delete( integer $id )
Process the removal of a given record
Process the removal of a given record
Parameters
- $id
- primary ID of a value to be removed
Returns
boolean returns true on success
Since
v1.0.0
|