Changeset 3281
- Timestamp:
- 08/06/2008 11:13:58 AM (4 months ago)
- Location:
- trunk
- Files:
-
- 5 modified
-
application/controllers/welcome.php (modified) (1 diff)
-
modules/kodoc/controllers/kodoc.php (modified) (1 diff)
-
modules/media/controllers/media.php (modified) (1 diff)
-
system/controllers/captcha.php (modified) (1 diff)
-
system/libraries/Controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/application/controllers/welcome.php
r3275 r3281 41 41 } 42 42 43 public function _ default()43 public function __call($method, $arguments) 44 44 { 45 45 // Disable auto-rendering 46 46 $this->auto_render = FALSE; 47 47 48 // By defining a method called _default, all pages routed to this controller48 // By defining a __call method, all pages routed to this controller 49 49 // that result in 404 errors will be handled by this method, instead of 50 50 // being displayed as "Page Not Found" errors. 51 echo 'This is a _default handler. If you expected the index page, you need to use: welcome/index/'.substr(Router::$current_uri, 8);51 echo 'This text is generated by __call. If you expected the index page, you need to use: welcome/index/'.substr(Router::$current_uri, 8); 52 52 } 53 53 -
trunk/modules/kodoc/controllers/kodoc.php
r3163 r3281 54 54 } 55 55 56 public function _ default()56 public function __call($method, $args) 57 57 { 58 58 if (count($segments = $this->uri->segment_array(1)) > 1) -
trunk/modules/media/controllers/media.php
r3244 r3281 121 121 } 122 122 123 public function _ default()123 public function __call($method, $args) 124 124 { 125 125 $segments = $this->uri->argument_array(); -
trunk/system/controllers/captcha.php
r3064 r3281 14 14 class Captcha_Controller extends Controller { 15 15 16 public function _ default()16 public function __call($method, $args) 17 17 { 18 18 // Output the Captcha challenge resource (no html) -
trunk/system/libraries/Controller.php
r3171 r3281 37 37 38 38 /** 39 * Handles methods that do not exist. 40 * 41 * @param string method name 42 * @param array arguments 43 * @return void 44 */ 45 public function __call($method, $args) 46 { 47 // Default to showing a 404 page 48 Event::run('system.404'); 49 } 50 51 /** 39 52 * Includes a View within the controller scope. 40 53 *
