PHP Class Asvae\ApiTester\Repositories\RequestRepository

Inheritance: implements Asvae\ApiTester\Contracts\RequestRepositoryInterface
Datei anzeigen Open project: asvae/laravel-api-tester

Protected Properties

Property Type Description
$requests
$storage

Public Methods

Method Description
__construct ( Asvae\ApiTester\Contracts\StorageInterface $storage ) RequestRepository constructor.
all ( ) : mixed
exists ( integer $id ) : boolean
find ( integer $id ) : RequestEntity
flush ( ) : void
persist ( RequestEntity $request ) : mixed
remove ( string $id )

Protected Methods

Method Description
getDataFromStorage ( ) : mixed Get all stored data storage.
load ( ) : void Get data from storage and load it into collection.
reload ( ) Replace existing collection with data loaded from storage.

Method Details

__construct() public method

RequestRepository constructor.
public __construct ( Asvae\ApiTester\Contracts\StorageInterface $storage )
$storage Asvae\ApiTester\Contracts\StorageInterface

all() public method

public all ( ) : mixed
return mixed

exists() public method

public exists ( integer $id ) : boolean
$id integer
return boolean

find() public method

public find ( integer $id ) : RequestEntity
$id integer
return Asvae\ApiTester\Entities\RequestEntity

flush() public method

public flush ( ) : void
return void

getDataFromStorage() protected method

Get all stored data storage.
protected getDataFromStorage ( ) : mixed
return mixed

load() protected method

Get data from storage and load it into collection.
protected load ( ) : void
return void

persist() public method

public persist ( RequestEntity $request ) : mixed
$request Asvae\ApiTester\Entities\RequestEntity
return mixed

reload() protected method

Replace existing collection with data loaded from storage.
protected reload ( )

remove() public method

public remove ( string $id )
$id string

Property Details

$requests protected_oe property

protected $requests

$storage protected_oe property

protected $storage