1 | <?php |
||
25 | trait ModelBindings |
||
26 | { |
||
27 | /** |
||
28 | * Fetches the records matching the specified conditions. |
||
29 | * |
||
30 | * A {@link Fetcher} instance is used to fetch the records. |
||
31 | * |
||
32 | * @param array $conditions |
||
33 | * |
||
34 | * @return RecordCollection |
||
35 | */ |
||
36 | public function fetch_records(array $conditions) |
||
40 | |||
41 | /** |
||
42 | * Fetches a record matching the specified conditions. |
||
43 | * |
||
44 | * The model's {@link fetch_records} prototype method is used to retrieve the record. |
||
45 | * |
||
46 | * @param array $conditions |
||
47 | * @param Fetcher $fetcher If the parameter `fetcher` is present, the {@link Fetcher} |
||
48 | * instance created to fetch the record is stored inside. |
||
49 | * |
||
50 | * @return ActiveRecord|null |
||
51 | */ |
||
52 | public function fetch_record(array $conditions, &$fetcher = null) |
||
56 | } |
||
57 |