Taufan Aditya | 8af88f3 | 2012-05-15 21:52:53 +0700 | [diff] [blame^] | 1 | <?php |
| 2 | |
| 3 | class Mock_Core_Security extends CI_Security { |
| 4 | |
| 5 | public function csrf_set_cookie() |
| 6 | { |
| 7 | return $this; |
| 8 | } |
| 9 | |
| 10 | // Overide inaccesible protected properties |
| 11 | public function __get($property) |
| 12 | { |
| 13 | return isset($this->{'_'.$property}) ? $this->{'_'.$property} : NULL; |
| 14 | } |
| 15 | |
| 16 | // Overide inaccesible protected method |
| 17 | public function __call($method, $params) |
| 18 | { |
| 19 | if (is_callable(array($this, '_'.$method))) |
| 20 | { |
| 21 | return call_user_func_array(array($this, '_'.$method), $params); |
| 22 | } |
| 23 | |
| 24 | throw new BadMethodCallException('Method '.$method.' was not found'); |
| 25 | } |
| 26 | |
| 27 | } |