1 | <?php |
||
37 | class ProcessRepository extends AbstractRepository |
||
38 | { |
||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $tableName = 'tx_crawler_process'; |
||
43 | |||
44 | /** |
||
45 | * This method is used to find all cli processes within a limit. |
||
46 | * |
||
47 | * @param string $orderField |
||
48 | * @param string $orderDirection |
||
49 | * @param integer $itemCount |
||
50 | * @param integer $offset |
||
51 | * @param string $where |
||
52 | * |
||
53 | * @return ProcessCollection |
||
54 | */ |
||
55 | public function findAll($orderField = '', $orderDirection = 'DESC', $itemCount = null, $offset = null, $where = '') |
||
83 | |||
84 | /** |
||
85 | * This method is used to count all processes in the process table. |
||
86 | * |
||
87 | * @param string $where Where clause |
||
88 | * |
||
89 | * @return integer |
||
90 | */ |
||
91 | public function countAll($where = '1 = 1') |
||
95 | |||
96 | /** |
||
97 | * Returns the number of active processes. |
||
98 | * |
||
99 | * @return integer |
||
100 | */ |
||
101 | public function countActive() |
||
105 | |||
106 | /** |
||
107 | * Returns the number of processes that live longer than the given timestamp. |
||
108 | * |
||
109 | * @param integer $ttl |
||
110 | * |
||
111 | * @return integer |
||
112 | */ |
||
113 | public function countNotTimeouted($ttl) |
||
117 | |||
118 | /** |
||
119 | * Get limit clause |
||
120 | * |
||
121 | * @param integer $itemCount |
||
122 | * @param integer $offset |
||
123 | * |
||
124 | * @return string |
||
125 | */ |
||
126 | 4 | public static function getLimitFromItemCountAndOffset($itemCount, $offset) |
|
134 | } |
||
135 |