{"issue":{"created_at":"2011-08-31T14:20:05Z","state":"open","updated_at":"2011-12-01T13:58:37Z","comments":7,"user":{"gravatar_id":"ea0f05c156b00d86d209fdc1259f9117","id":630484,"url":"https://api.github.com/users/dchill42","avatar_url":"https://secure.gravatar.com/avatar/ea0f05c156b00d86d209fdc1259f9117?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"dchill42"},"body":"This is a less drastic set of changes in parallel with [Core refactoring with HMVC support and OOP improvements](https://github.com/EllisLab/CodeIgniter/pull/351). In short, it adds HMVC but leaves out the OOP refactoring. An overview of the changes follows:\r\n\r\nCodeIgniter.php:\r\n* Added CodeIgniter class, which dissociates the singleton behavior and class object repository from CI_Controller to allow multiple Controller loading.\r\n* Added new CodeIgniter class instantiation before loading core modules.\r\n* Routed core class loads through CodeIgniter class to simplify attachment to CI object, and replaced globals with references to core classes via CodeIgniter object repository.\r\n* Applied package path searching to routed Controller load process.\r\n* Established special reference to routed Controller as $CI->routed.\r\n* Added call_controller() method for running Controller functions directly or through _remap().\r\n\r\nController.php:\r\n* Extracted singleton and object repository out to CodeIgniter object, from where objects are referenced via magic methods.\r\n\r\nLoader.php:\r\n* Added Controller loading method and optimized package paths instead of adding another one.\r\n* Helper paths consolidated with identical Library paths, and Model and View paths consolidated into MVC paths to also support Controllers - this allows processing two package path lists instead of five.\r\n* Preserved new View cascade feature in MVC paths.\r\n* Added resolution of relative package paths against include directories\r\n* Split autoload functionality to establish autoloaded package paths and config files in Loader constructor, so package paths can be searched when routing and loading routed Controller.\r\n* Consolidated set_base_classes() into _ci_autoload().\r\n* Optimized Model loader loop and made Helper loader consistent with other loader methods.\r\n\r\nRouter.php:\r\n* Added validate_route() - a stateless route validation method, which is used for traditional controller routing as well as sub-controller dispatching, and provides the identified package path to eliminate redundant searching on load\r\n* Added get_error_route() to determine if valid error override is available.\r\n* Applied package paths to search for routed Controller.\r\n* Optimized external module references.\r\n\r\nConfig.php:\r\n* Added get() and get_ext() methods to centralize config file loading.\r\n\r\nExceptions.php:\r\n* Added error override behavior to show_error() for general and 404 exceptions.\r\n\r\nRemaining changes are generally minor:\r\n* Resolved former monolithic Controller references to $CI->routed in accordance with CI_Controller/CodeIgniter split.\r\n* Replaced global references with CodeIgniter object repository references\r\n* Replaced config file loads with calls to Config->get() or Config->get_ext()\r\n","assignee":null,"id":1532440,"number":357,"pull_request":{"patch_url":"https://github.com/EllisLab/CodeIgniter/pull/357.patch","html_url":"https://github.com/EllisLab/CodeIgniter/pull/357","diff_url":"https://github.com/EllisLab/CodeIgniter/pull/357.diff"},"labels":[],"title":"Adapted core to support HMVC","html_url":"https://github.com/EllisLab/CodeIgniter/issues/357","closed_at":null,"url":"https://api.github.com/repos/EllisLab/CodeIgniter/issues/357","milestone":null},"action":"created","comment":{"created_at":"2011-12-01T13:58:37Z","updated_at":"2011-12-01T13:58:37Z","user":{"gravatar_id":"14df293d6c5cd6f05996dfc606a6a951","id":67381,"url":"https://api.github.com/users/philsturgeon","avatar_url":"https://secure.gravatar.com/avatar/14df293d6c5cd6f05996dfc606a6a951?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"philsturgeon"},"body":"Yep it was too hard for me to work new features into 2.1 after \ncherry-picking that branch together based on stuff that WAS heading for \n3.0.\n\nI can understand the concerns from EllisLab that it changes a lot of \ncode and will be hard to test.\n\nI think the main way we can get this done is to finish unit testing and \nimplement it in the develop branch. Then we can merge bug changes much \neasier because we can just run tests to carpet-cover everything, instead \nof relying on people clicking around!\n> ------------------------------------------------------------------------\n>\n> \tDarren Hill \n> <mailto:reply@reply.github.com>\n> 1 December 2011 13:46\n>\n>\n> @Repox - Thanks for your support! I just noticed [this news \n> story](http://codeigniter.com/news/codeigniter_2.1.0_belated_release_announcement) \n> yesterday, which suggests that HMVC will be added in for 3.0, so I \n> expect we'll see some movement soon.\n>\n> ---\n> Reply to this email directly or view it on GitHub:\n> https://github.com/EllisLab/CodeIgniter/pull/357#issuecomment-2974825","id":2974932,"url":"https://api.github.com/repos/EllisLab/CodeIgniter/issues/comments/2974932"}}