blob: c5269fbc55c2cb4920e8c58623b1b96ea1a300c5 [file] [log] [blame]
Taufan Aditya8af88f32012-05-15 21:52:53 +07001<?php
2
3class Mock_Core_Security extends CI_Security {
4
5 public function csrf_set_cookie()
6 {
Taufan Adityad40a5452012-05-15 22:00:14 +07007 // We cannot set cookie in CLI mode, so for csrf test, who rely on $_COOKIE,
8 // we superseded set_cookie with directly set the cookie variable,
9 // @see : ./Bootstrap.php, line 16
Taufan Aditya8af88f32012-05-15 21:52:53 +070010 return $this;
11 }
12
13 // Overide inaccesible protected properties
14 public function __get($property)
15 {
16 return isset($this->{'_'.$property}) ? $this->{'_'.$property} : NULL;
17 }
18
19 // Overide inaccesible protected method
20 public function __call($method, $params)
21 {
22 if (is_callable(array($this, '_'.$method)))
23 {
24 return call_user_func_array(array($this, '_'.$method), $params);
25 }
26
27 throw new BadMethodCallException('Method '.$method.' was not found');
28 }
29
30}