Changeset 3366 for trunk/system/i18n

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
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/i18n/en_US/errors.php

    r3326 r3366  
    33$lang = array 
    44( 
    5         E_KOHANA             => array( 1, 'Framework Error',   'Please check the Kohana documentation for information about the following error.'), 
    6         E_PAGE_NOT_FOUND     => array( 1, 'Page Not Found',    'The requested page was not found. It may have moved, been deleted, or archived.'), 
    7         E_DATABASE_ERROR     => array( 1, 'Database Error',    'A database error occurred while performing the requested procedure. Please review the database error below for more information.'), 
    8         E_RECOVERABLE_ERROR  => array( 1, 'Recoverable Error', 'An error was detected which prevented the loading of this page. If this problem persists, please contact the website administrator.'), 
    9         E_ERROR              => array( 1, 'Fatal Error',       ''), 
    10         E_USER_ERROR         => array( 1, 'Fatal Error',       ''), 
    11         E_PARSE              => array( 1, 'Syntax Error',      ''), 
    12         E_WARNING            => array( 1, 'Warning Message',   ''), 
    13         E_USER_WARNING       => array( 1, 'Warning Message',   ''), 
    14         E_STRICT             => array( 2, 'Strict Mode Error', ''), 
    15         E_NOTICE             => array( 2, 'Runtime Message',   ''), 
     5        E_KOHANA             => array( 1, 'Framework Error'), 
     6        E_PAGE_NOT_FOUND     => array( 1, 'Page Not Found'), 
     7        E_DATABASE_ERROR     => array( 1, 'Database Error'), 
     8        E_RECOVERABLE_ERROR  => array( 1, 'Recoverable Error'), 
     9        E_ERROR              => array( 1, 'Fatal Error'), 
     10        E_USER_ERROR         => array( 1, 'Fatal Error'), 
     11        E_PARSE              => array( 1, 'Parse Error'), 
     12        E_WARNING            => array( 1, 'Runtime Warning'), 
     13        E_USER_WARNING       => array( 1, 'Runtime Warning'), 
     14        E_STRICT             => array( 2, 'Strict Mode Error'), 
     15        E_NOTICE             => array( 2, 'Notice'), 
     16        E_USER_NOTICE        => array( 2, 'Notice'), 
    1617);