Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function handler($callable) |
||
25 | { |
||
26 | // If normal handler is passed |
||
27 | if (is_callable($callable)) { |
||
28 | // Add handler |
||
29 | $this->handlers[] = $callable; |
||
30 | |||
31 | // Get passed arguments |
||
32 | $args = func_get_args(); |
||
33 | |||
34 | // Remove first argument |
||
35 | array_shift($args); |
||
36 | |||
37 | // Add handler parameters stack |
||
38 | $this->params[] = &$args; |
||
39 | } else { |
||
40 | //e('Cannot set Query handler - function(##) does not exists', E_SAMSON_ACTIVERECORD_ERROR, $callable); |
||
41 | } |
||
42 | |||
43 | return $this; |
||
44 | } |
||
45 | |||
62 |