| | 239 | |
| | 240 | /** |
| | 241 | * Returns the path to the current controller (not including the actual |
| | 242 | * controller), as a web path |
| | 243 | * |
| | 244 | * @param bool If a full url should be returned, or only the path specifically |
| | 245 | */ |
| | 246 | public function controller_path($full = TRUE) { |
| | 247 | if ($full) |
| | 248 | { |
| | 249 | return url::site(self::$controller_path); |
| | 250 | } |
| | 251 | return self::$controller_path; |
| | 252 | } |
| | 253 | |
| | 254 | /** |
| | 255 | * Returns the current controller, as a web path |
| | 256 | * |
| | 257 | * @param bool If a full url should be returned, or only the controller specifically |
| | 258 | */ |
| | 259 | public function controller($full = TRUE) { |
| | 260 | if ($full) |
| | 261 | { |
| | 262 | return url::site(self::$controller_path.self::$controller); |
| | 263 | } |
| | 264 | return self::$controller; |
| | 265 | } |
| | 266 | |
| | 267 | /** |
| | 268 | * Returns the current method, as a web path |
| | 269 | * |
| | 270 | * @param bool If a full url should be returned, or only the method specifically |
| | 271 | */ |
| | 272 | public function method($full = TRUE) { |
| | 273 | if ($full) |
| | 274 | { |
| | 275 | return url::site(self::$controller_path.self::$controller.'/'.self::$method); |
| | 276 | } |
| | 277 | return self::$method; |
| | 278 | } |