Reverse Routing (based on DrF Reverse Routing) |
[eluser]mattalexx[/eluser]
I have developed a new reverse routing extension based on the awesome DrF Reverse Routing (forum post, wiki page). If you have doubts about what reverse routing is, check out the forum post. Improvements - Cached route data: The routing configuration is grabbed and parsed once per request, not every time site_url() is called - Extension of CI_Config instead of url_helper (url_helper was just calling CI_Config anyway) - Code refactoring: Removed unused variables, reduced lines of code a bit Tested on PHP 5.2 (written with PHP 4 in mind) Codeigniter 1.7.2 The Code (extension of CI_Config) Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
[eluser]imarek[/eluser]
My question might be trivial but I have been doing CI just for couple days now. I am having difficulties to initiate MY_Config at all. I do understand that to make it happen automatically I have to have: Code: $config['subclass_prefix'] = 'MY_'; Is there anything I am missing?
[eluser]techgnome[/eluser]
Make sure you're putting it in the right place: /Application/Core ... ran into a similar problem the other day because I was trying to stuff it into /System/Core.... -tg
[eluser]imarek[/eluser]
Thanks a lot for a tip. Problem has been sorted. Not sure what caused the issue. Haven't tested routing yet as I am busy with other things at the moment but all ready and loaded. I added test_me() method inside MY_Controller that returns string to make sure all is good as without routing couldn't test. I will be testing this module next week probably along with my multimodule url so will try to place a little comment.
[eluser]Alexander84[/eluser]
Doesn't work for me, unfortunately. Mattalexx, could you be so kind and zip your solution, or at least provide step-by-step guide for CodeIgniter2?
[eluser]mattalexx[/eluser]
[quote author="Alexander84" date="1299898489"]Doesn't work for me, unfortunately. Mattalexx, could you be so kind and zip your solution, or at least provide step-by-step guide for CodeIgniter2?[/quote] I have a project coming up that calls for CI. I'll get it working in CI 2 and post here, so make sure you're subscribed to the thread. |
Welcome Guest, Not a member yet? Register Sign In |