Changeset 3366 for trunk/application

Show
Ignore:
Timestamp:
08/27/2008 05:15:39 PM (3 months ago)
Author:
Shadowhand
Message:

API CHANGE! Major changes to error reporting, routing, and class naming!

Complete change of autoloading: classes are now loaded by changing underscores to slashes to create a path, eg: Controller_Admin_User would be found at classes/admin/user.php (See routing changes below for more information)

  • All classes (libraries, helpers, controllers, and models) are now stored under the classes/ directory
  • Controllers and models are now prefixed instead of suffixed (eg: Controller_Welcome instead of Welcome_Controller)
  • All classes can now become transparently extensible by adding a "Core" suffix (eg: User_Model_Core extends Model)
  • Archive module has had it's drivers updated with new paths, but other modules will need to be updated, and will be non-functional temporarily

Complete routing change: routes are now defined similar to Horde Routes (see http://dev.horde.org/routes/manual/nitty-gritty-route-setup.html ), see http://paste.isanonymo.us/Dmq6n6FYfHnFFhbFs0weS8KqfDgBiGkS for an example of new routes configuration. Official documentation to follow.

  • Default route in system/config/routes.php changed
  • URI class removed because all arguments are now named (eg: Router::$argumentsid? to fetch the :id arg)
  • Added Router::compile to compile the regex for given route (protected)
  • Added Router::keys to find the :keys from a URI string
  • Added Router::uri to generate a URI from a route name and values (not complete)

Other misc changes:

  • Errors and exceptions are now inline, rather than replacing the entire page. Having core.display_errors disabled has no effect (not complete)
  • Added application/i18n/en_US directory for application language files (eg: Validation errors)
  • UTF-8 environment check moved to bootstrap.php
Location:
trunk/application
Files:
5 added
3 removed
3 modified
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/application/cache

    • Property svn:ignore set to
      *
  • trunk/application/classes/controller/examples.php

    r3326 r3366  
    1313 * @license    http://kohanaphp.com/license.html 
    1414 */ 
    15 class Examples_Controller extends Controller { 
     15class Controller_Examples extends Controller { 
    1616 
    1717        // Do not allow to run in production 
  • trunk/application/classes/controller/welcome.php

    r3326 r3366  
    99 * @license    http://kohanaphp.com/license.html 
    1010 */ 
    11 class Welcome_Controller extends Template_Controller { 
     11class Controller_Welcome extends Controller_Template { 
    1212 
    1313        // Disable this controller when Kohana is set to production mode. 
  • trunk/application/config/config.php

    r3326 r3366  
    9797$config['modules'] = array 
    9898( 
     99        // MODPATH.'archive',   // Archive utility 
    99100        // MODPATH.'auth',      // Authentication 
    100101        // MODPATH.'forge',     // Form generation 
     
    102103        // MODPATH.'media',     // Media caching and compression 
    103104        // MODPATH.'gmaps',     // Google Maps integration 
    104         // MODPATH.'archive',   // Archive utility 
    105105        // MODPATH.'payment',   // Online payments 
    106106        // MODPATH.'unit_test', // Unit testing 
  • trunk/application/logs

    • Property svn:ignore
      •  

        old new  
        1 *.log.php 
         1*