PHP Class Blast\Orm\AbstractRepository

Inheritance: implements Blast\Orm\MapperFactoryInterface, implements Blast\Orm\RepositoryInterface, use trait MapperFactoryTrait
Exibir arquivo Open project: phpthinktank/blast-orm

Public Methods

Method Description
all ( ) : SplStack | array Get a collection of all entities
find ( mixed $primaryKey ) : ArrayObject | stdClass | object Find entity by primary key
getEntity ( ) : object Get entity for repository
save ( object | array $data ) : integer | boolean Save new or existing entity data

Method Details

all() public method

Get a collection of all entities
public all ( ) : SplStack | array
return SplStack | array

find() public method

Find entity by primary key
public find ( mixed $primaryKey ) : ArrayObject | stdClass | object
$primaryKey mixed
return ArrayObject | stdClass | object

getEntity() abstract public method

Get entity for repository
abstract public getEntity ( ) : object
return object

save() public method

Save new or existing entity data
public save ( object | array $data ) : integer | boolean
$data object | array
return integer | boolean