Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7932155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:55:58+00:00 2026-06-03T20:55:58+00:00

i need to load a library from my module using Modular Extensions my structure

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:55:59+00:00Added an answer on June 3, 2026 at 8:55 pm

    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:

    /application/
       config
       modules/
        categories/
          views
          controllers/
            categories.php
          libraries/
            categories_class.php
          models
       libraries
       core
       controllers
    

    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.

    Controllers can be loaded as class variables of other controllers
    using $this->load->module(’module/controller’); or simply
    $this->load->module(’module’); if the controller name matches the
    module name.

    Any loaded module controller can then be used like a library, ie:
    $this->controller->method(), but it has access to its own models and
    libraries independently from the caller.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app need to load photos from simulator photo library. After I
I need to find/create a library that can load hdr images in many formats
I need to load an image from a web in a simple Java stand
I need to load a model, existing of +/- 20 tables from the database
I need to load a .xml file from a URL adress into an NSData
I need to load a file from an umounted TrueCrypt disk into memory. Is
I need to load some resource from my DLL (i need to load them
I need to load an XML source using Simple XML, duplicate an existing node
I need my MVC 3.0 project to support modules. By module I mean having
This question follows on from Assembly does not allow partially trusted callers when using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.