Changeset 412
- Timestamp:
- 08/26/2007 02:43:57 PM (14 months ago)
- Location:
- branches/devel
- Files:
-
- 2 added
- 5 modified
-
application/config/database.php (added)
-
application/config/routes.php (modified) (1 diff)
-
application/controllers/welcome.php (modified) (1 diff)
-
application/views/welcome.php (modified) (1 diff)
-
system/core/Bootstrap.php (modified) (2 diffs)
-
system/libraries/Database.php (added)
-
system/libraries/URI.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/devel/application/config/routes.php
r397 r412 2 2 3 3 $config['_default'] = 'user_guide/kohana'; 4 // $config['_default'] = 'welcome'; -
branches/devel/application/controllers/welcome.php
r409 r412 5 5 function index() 6 6 { 7 print new View('welcome', array('message' => 'testing calls back to the controller')); 8 9 // $db = new Database(); 10 // print_r ($db); 11 } 12 13 function say_hello() 14 { 15 return '<strong>OMG HI!!!!1</strong>'; 7 $db = new Database(); 8 print_r ($db); 16 9 } 17 10 -
branches/devel/application/views/welcome.php
r411 r412 1 1 <h2><?php echo $message ?></h2> 2 <p><?= $this->say_hello() ?></p> 2 3 <hr/> -
branches/devel/system/core/Bootstrap.php
r397 r412 57 57 */ 58 58 $controller = Kohana::instance(); 59 59 60 60 if (method_exists($controller, '_remap')) 61 61 { … … 96 96 // Run system.post_controller 97 97 Event::run('system.post_controller'); 98 99 // Make sure that $controller is not available globally 100 unset($controller); 98 101 } 99 102 catch (controller_not_found $exception) -
branches/devel/system/libraries/URI.php
r407 r412 2 2 3 3 class URI_Core extends Router { 4 4 5 5 public function segment($index = 1) 6 6 { 7 7 $index = (int) $index - 1; 8 8 9 9 return isset(self::$segments[$index]) ? self::$segments[$index] : FALSE; 10 10 } … … 19 19 $segment_array[$i++] = $segment; 20 20 } 21 21 22 22 return $segment_array; 23 23 } 24 24 25 25 public function string() 26 26 { 27 27 return implode('/', self::$segments); 28 28 } 29 29 30 30 } // End URI Class
