Show
Ignore:
Timestamp:
02/28/2008 10:34:02 AM (9 months ago)
Author:
gregmac
Message:

Added Router_Core::$controller_path, URI->controller_path(), URI->controller(), URI->method()

Files:
1 modified

Legend:

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

    r2171 r2182  
    2121        public static $url_suffix   = ''; 
    2222 
    23         public static $directory  = FALSE; 
    24         public static $controller = FALSE; 
    25         public static $method     = FALSE; 
    26         public static $arguments  = FALSE; 
     23        public static $directory       = FALSE; 
     24        public static $controller      = FALSE; 
     25        public static $controller_path = FALSE; 
     26        public static $method          = FALSE; 
     27        public static $arguments       = FALSE; 
    2728 
    2829        /** 
     
    142143                        // Path to be added to as we search deeper 
    143144                        $search = 'controllers'; 
    144  
     145                         
     146                        // controller path to be added to as we search deeper 
     147                        $controller_path = ''; 
     148                         
    145149                        // Use the rsegments to find the controller 
    146150                        foreach(self::$rsegments as $key => $segment) 
     
    152156                                        { 
    153157                                                self::$directory  = $path.$search.'/'; 
     158                                                self::$controller_path = $controller_path; 
    154159                                                self::$controller = $segment; 
    155160                                                self::$method     = isset(self::$rsegments[$key + 1]) ? self::$rsegments[$key + 1] : 'index'; 
     
    163168                                // Add the segment to the search 
    164169                                $search .= '/'.$segment; 
     170                                $controller_path .= $segment.'/'; 
    165171                        } 
    166172                }