Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 14 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
39 | public function fetch() |
||
40 | { |
||
41 | if ($this->cached && isset($this->value)) { |
||
42 | return $this->value; |
||
43 | } |
||
44 | $args = $this->context; |
||
45 | // useで引数を指定した場合、call_user_func_arrayの$argsと |
||
46 | // 引数の数が合わなくなり警告が出るが問題なく実行出来る |
||
47 | $result = @call_user_func_array($this->callback, $args); |
||
48 | if ($this->cached) { |
||
49 | $this->value = $result; |
||
50 | } |
||
51 | |||
52 | return $result; |
||
53 | } |
||
55 |