Changeset 3281

Show
Ignore:
Timestamp:
08/06/2008 11:13:58 AM (4 months ago)
Author:
Shadowhand
Message:

Follow up to r3280

Location:
trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/application/controllers/welcome.php

    r3275 r3281  
    4141        } 
    4242 
    43         public function _default() 
     43        public function __call($method, $arguments) 
    4444        { 
    4545                // Disable auto-rendering 
    4646                $this->auto_render = FALSE; 
    4747 
    48                 // By defining a method called _default, all pages routed to this controller 
     48                // By defining a __call method, all pages routed to this controller 
    4949                // that result in 404 errors will be handled by this method, instead of 
    5050                // 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); 
    5252        } 
    5353 
  • trunk/modules/kodoc/controllers/kodoc.php

    r3163 r3281  
    5454        } 
    5555 
    56         public function _default() 
     56        public function __call($method, $args) 
    5757        { 
    5858                if (count($segments = $this->uri->segment_array(1)) > 1) 
  • trunk/modules/media/controllers/media.php

    r3244 r3281  
    121121        } 
    122122 
    123         public function _default() 
     123        public function __call($method, $args) 
    124124        { 
    125125                $segments = $this->uri->argument_array(); 
  • trunk/system/controllers/captcha.php

    r3064 r3281  
    1414class Captcha_Controller extends Controller { 
    1515 
    16         public function _default() 
     16        public function __call($method, $args) 
    1717        { 
    1818                // Output the Captcha challenge resource (no html) 
  • trunk/system/libraries/Controller.php

    r3171 r3281  
    3737 
    3838        /** 
     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        /** 
    3952         * Includes a View within the controller scope. 
    4053         *