Show
Ignore:
Timestamp:
07/20/2008 09:27:11 PM (4 months ago)
Author:
Shadowhand
Message:

Optimizations to Input, URI, View, and Controller

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Controller.php

    r2229 r3171  
    2323        public function __construct() 
    2424        { 
    25                 if (Kohana::$instance === NULL) 
     25                if (Kohana::$instance == NULL) 
    2626                { 
    2727                        // Set the instance to the first controller loaded 
    2828                        Kohana::$instance = $this; 
     29                } 
    2930 
    30                         // URI should always be available 
    31                         $this->uri = new URI; 
     31                // URI should always be available 
     32                $this->uri = URI::instance(); 
    3233 
    33                         // Input should always be available 
    34                         $this->input = new Input; 
    35                 } 
    36                 else 
    37                 { 
    38                         // URI should always be available 
    39                         $this->uri = Kohana::$instance->uri; 
    40  
    41                         // Input should always be available 
    42                         $this->input = Kohana::$instance->input; 
    43                 } 
     34                // Input should always be available 
     35                $this->input = Input::instance(); 
    4436        } 
    4537