Well there is no absolute reference to the current module controller… so not really.
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
August 30, 2010 3:03am
Subscribe [81]#121 / Sep 27, 2010 7:32am
Well there is no absolute reference to the current module controller… so not really.
#122 / Sep 27, 2010 7:46am
@WanWizard
How is your “Modular CI” different from wiredesignz’s implementation?
#123 / Sep 27, 2010 8:13am
@ralf57, He may feel better to answer in his Modular CI thread. Thanks.
#124 / Sep 27, 2010 9:09am
You’re right wire,
sorry for “polluting” the thread
#125 / Sep 27, 2010 4:10pm
In the Modular Separation maintained by Phil he created an enhancement (i thought do anyway) that would load extended classes from the core-folder.
Like Base_Controller extending MX_Controller (located in core-folder).
Is this something you plan to add? It keeps my library-folder cleaner 😊
#126 / Sep 27, 2010 6:56pm
Hey Johan, yes entirley possible to add autoloading from application/core.
Bitbucket is now updated with spl_autoload for application/core base classes. Thanks Johan.
#127 / Sep 28, 2010 3:16pm
Great!
Thanks for some really good work!
#128 / Sep 29, 2010 6:53am
Thanks for bringing that up Johan, it’s good to have that feature back.
I’m getting an error now that I’m pushing v1.1 of my CMS to live (which contains Modular Extensions minus the MX_Controller stuff). This is all working perfectly fine on local, but when it gets to my CentOS live server I get the error:
Fatal error: Class ‘MX_Loader’ not found in /usr/local/www/application/third_party/MX/Ci.php on line 47
As you’ve pointed out before this code is rather complex so instead of faffing, debugging and false fixing like before I figure I’d let you answer.
#129 / Sep 29, 2010 7:11am
Hi Phil,
I may be wrong on this, like you said the code is complex.
But i think it’s missing this at the top!
require_once 'loader.php';InsiteFX
#130 / Sep 29, 2010 7:12am
@Phil, do you have MY_Loader.php in application/core which includes MX / Loader.php like so.
<?php (defined('BASEPATH')) OR exit('No direct script access allowed');
require APPPATH."third_party/MX/Loader.php";
class MY_Loader extends MX_Loader {}@InsiteFX, Modular Extensions relies on CI to load the MX_loader class via MY_Loader.php allowing for future user extensions of the class.
#131 / Sep 29, 2010 7:30am
Thanks wiredesignz, that’s good to know.
As always it takes a little time to get use to new code.
InsiteFX
#132 / Sep 29, 2010 5:14pm
Im having the same problem as Phil on this ! soon as i put it on a live environment its giving the same fault :( ??
#133 / Sep 29, 2010 6:53pm
@Bainzy, It is beginning to sound like a file naming issue or loading sequence issue.
EDIT:
Try moving the code on line 3 of MX/Loader.php ...
(class_exists('CI', FALSE)) OR require 'Ci.php';... to a line after the end of the MX_Loader class declaration.
#134 / Sep 30, 2010 12:52pm
Is it feasible to include config & libraries inside a module where the module library is using an instance of the ci object to load a module config file (module/config/foo.php) with $this->ci->load->config(‘module/foo’) or another a config in another module like config(‘other/foo’)?
I’m having difficulty with attempting to load any type of module files like configs or models in this manner from a module library, what would be the best way to implement this?
#135 / Sep 30, 2010 3:47pm
Is it feasible to include config & libraries inside a module where the module library is using an instance of the ci object to load a module config file (module/config/foo.php) with $this->ci->load->config(‘module/foo’) or another a config in another module like config(‘other/foo’)?
I’m having difficulty with attempting to load any type of module files like configs or models in this manner from a module library, what would be the best way to implement this?
Well it seems once I dropped MY_Config and MY_Lang into application/core and extended their respective MX classes this took care of the issue…