| 199 |
lars |
1 |
<?php namespace Clockwork\Storage;
|
|
|
2 |
|
|
|
3 |
use Clockwork\Request\Request;
|
|
|
4 |
|
|
|
5 |
// Interface for requests storage implementations
|
|
|
6 |
interface StorageInterface
|
|
|
7 |
{
|
|
|
8 |
// Returns all requests
|
|
|
9 |
public function all(Search $search = null);
|
|
|
10 |
|
|
|
11 |
// Return a single request by id
|
|
|
12 |
public function find($id);
|
|
|
13 |
|
|
|
14 |
// Return the latest request
|
|
|
15 |
public function latest(Search $search = null);
|
|
|
16 |
|
|
|
17 |
// Return requests received before specified id, optionally limited to specified count
|
|
|
18 |
public function previous($id, $count = null, Search $search = null);
|
|
|
19 |
|
|
|
20 |
// Return requests received after specified id, optionally limited to specified count
|
|
|
21 |
public function next($id, $count = null, Search $search = null);
|
|
|
22 |
|
|
|
23 |
// Store request
|
|
|
24 |
public function store(Request $request);
|
|
|
25 |
|
|
|
26 |
// Update existing request
|
|
|
27 |
public function update(Request $request);
|
|
|
28 |
|
|
|
29 |
// Cleanup old requests
|
|
|
30 |
public function cleanup();
|
|
|
31 |
}
|