| @@ 187-189 (lines=3) @@ | ||
| 184 | Debug::message("Action not set; using default action method name 'index'"); |
|
| 185 | } |
|
| 186 | $action = "index"; |
|
| 187 | } else if(!is_string($action)) { |
|
| 188 | user_error("Non-string method name: " . var_export($action, true), E_USER_ERROR); |
|
| 189 | } |
|
| 190 | ||
| 191 | $classMessage = Director::isLive() ? 'on this handler' : 'on class '.get_class($this); |
|
| 192 | ||
| @@ 158-159 (lines=2) @@ | ||
| 155 | function singleton($className) { |
|
| 156 | if($className == "Config") user_error("Don't pass Config to singleton()", E_USER_ERROR); |
|
| 157 | if(!isset($className)) user_error("singleton() Called without a class", E_USER_ERROR); |
|
| 158 | if(!is_string($className)) user_error("singleton() passed bad class_name: " . var_export($className,true), |
|
| 159 | E_USER_ERROR); |
|
| 160 | return Injector::inst()->get($className); |
|
| 161 | } |
|
| 162 | ||