i need to load a library from my module using Modular Extensions
my structure like this
modules/
modules/categories/library
- categories_class.php
modules/categories/controllers/
-
categories.php
I need to load categories library in categories controller .
any one cane help me?
I see two problems..
Problem 1
According to your question, your categories module is not organized properly. The whole purpose of HMVC is compartmentalizing of code e.x; modules. Given your present question how does that structure allow you to copy your modules folder and paste it into another app? Answer: It doesnt..
Follow the example below
It should be the following from the app root:
Problem 2
per the user guide: https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home
You must prefix the module name in front of anything referenced inside the modules folder.
e.g:
$this->load->library('module/library');or in your case:
$this->load->library('categories/categories_class');I have attempted previously to exclude the modules folder name and have never gotten it to work.