Joffrey Jaffeux | 9d14075 | 2012-06-06 01:40:18 +0200 | [diff] [blame] | 1 | <?php |
2 | |||||
3 | class Mock_Libraries_Encrypt extends CI_Encrypt { | ||||
4 | |||||
5 | // Overide inaccesible protected method | ||||
6 | public function __call($method, $params) | ||||
7 | { | ||||
8 | if (is_callable(array($this, '_'.$method))) | ||||
9 | { | ||||
10 | return call_user_func_array(array($this, '_'.$method), $params); | ||||
11 | } | ||||
12 | |||||
13 | throw new BadMethodCallException('Method '.$method.' was not found'); | ||||
14 | } | ||||
15 | } |