Joffrey Jaffeux | 9d14075 | 2012-06-06 01:40:18 +0200 | [diff] [blame] | 1 | <?php |
| 2 | |
| 3 | class Mock_Libraries_Encrypt extends CI_Encrypt { |
| 4 | |
Claudio Galdiolo | 80b7a38 | 2015-01-29 10:25:01 -0500 | [diff] [blame] | 5 | // Override inaccessible protected method |
Andrey Andreev | f243ce1 | 2012-06-09 23:34:21 +0300 | [diff] [blame] | 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 | } |
Joffrey Jaffeux | 9d14075 | 2012-06-06 01:40:18 +0200 | [diff] [blame] | 12 | |
Andrey Andreev | f243ce1 | 2012-06-09 23:34:21 +0300 | [diff] [blame] | 13 | throw new BadMethodCallException('Method '.$method.' was not found'); |
| 14 | } |
| 15 | |
Claudio Galdiolo | 80b7a38 | 2015-01-29 10:25:01 -0500 | [diff] [blame] | 16 | } |