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