HMVC - MY_Modules - extending modules.php |
[eluser]SPeed_FANat1c[/eluser]
Hi, there is possible to extend router.php and loader.php but I tried extendint modules.php the same way, but no success - the is no signs that it has been called. I guess this is because native CI does not have modules library and therefore it does not work when I have file MY_Modules.php Have someone tried doing this? Or have any thoughs how to do this?
[eluser]web-johnny[/eluser]
[quote author="SPeed_FANat1c" date="1309437716"]Hi, there is possible to extend router.php and loader.php but I tried extendint modules.php the same way, but no success - the is no signs that it has been called. I guess this is because native CI does not have modules library and therefore it does not work when I have file MY_Modules.php Have someone tried doing this? Or have any thoughs how to do this?[/quote] You can use the packages of CI 2 you can see them at : http://ellislab.com/codeigniter/user-gui...oader.html is below of the article or else you can use hmvc or else Matchbox
[eluser]SPeed_FANat1c[/eluser]
Quote:or else you can use hmvc I am already using HMVC and there is a file Modules.php in third_party/MX folder. But how can I extend it? Or something I did not understand what did you want to say?
[eluser]InsiteFX[/eluser]
You cannot use the MY_ prefix because the Modules.php is being loaded using spl_autoload, not being loaded by CI. Try extending it without the MY_ prefix. InsiteFX
[eluser]SPeed_FANat1c[/eluser]
[quote author="InsiteFX" date="1309484998"]You cannot use the MY_ prefix because the Modules.php is being loaded using spl_autoload, not being loaded by CI. Try extending it without the MY_ prefix. InsiteFX[/quote] Did not try without MY_ yet but I am thinking - how then I will force it to load? For example MY_Router.php is loaded automatically because the Router.php is loaded by CI or something like that.
[eluser]InsiteFX[/eluser]
The Modules.php is autoloaded with spl_autoload Try extending it and see if it will pick it up. If not you may need to include it then extend it. InsiteFX
[eluser]SPeed_FANat1c[/eluser]
ok, thank you, we'll try that later and see what happens. |
Welcome Guest, Not a member yet? Register Sign In |