-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFinder.php
44 lines (38 loc) · 979 Bytes
/
Finder.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* @copyright 2010-2014, The Titon Project
* @license http://opensource.org/licenses/bsd-license.php
* @link http://titon.io
*/
namespace Titon\Db;
/**
* A finder represents a specific type of query fetch, which allows alteration before or after.
*
* @package Titon\Db
* @codeCoverageIgnore
*/
interface Finder {
/**
* Process results after a query has executed.
*
* @param \Titon\Db\Entity[] $results
* @param array $options
* @return mixed
*/
public function after(array $results, array $options = []);
/**
* Modify a query before it's executed.
*
* @param \Titon\Db\Query $query
* @param array $options
* @return mixed
*/
public function before(Query $query, array $options = []);
/**
* Return an empty value when no results are found.
*
* @param array $options
* @return mixed
*/
public function noResults(array $options = []);
}