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 7052003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:19:53+00:00 2026-05-28T03:19:53+00:00

In CodeIgniter, is it okay to load libraries & models like the following: $my_library

  • 0

In CodeIgniter, is it okay to load libraries & models like the following:

$my_library = new my_library();

The reason I want to do this is because the editor I use (Komodo Edit) does not recognize the class for use with autocomplete when using $this->load.

  • 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-05-28T03:19:54+00:00Added an answer on May 28, 2026 at 3:19 am

    In certain cases it is acceptable to load classes like that however you should stick to using the CodeIgniter loader class unless it’s absolutely necessary not to. I would urge you to convert your libraries and models to be compatible with the CodeIgniter loader class.

    I understand what you mean when you say the autocomplete is not working. I use NetBeans and this is a problem I ran into as well. I did a little digging and although it’s much less documented for Komodo Edit, the solution to getting autocomplete working correctly is very similar to getting it working with NetBeans.

    First, here is a Komodo Edit bug report documenting the problem that you are having. It’s been open since 2008 so it’s likely it won’t ever be baked directly into the application since there is a simple workaround.

    Here is a blog post detailing the workaround. The idea is that you create a dummy PHP file in the root of your project containing a number of comments referencing the properties and methods of the core CodeIgniter classes. Komodo Edit will then reference the file and add the properties and methods to it’s code completion.

    The blog post looks a little outdated, but you should be able to easily modify it to get it working with whatever version of CodeIgniter you are using.

    And if you’re curious, here is a blog post detailing the same solution for Netbeans.

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

Sidebar

Related Questions

In codeigniter we use a method call like this $this->load->view(); I wanna know what's
I'm new to CodeIgniter, and I need some help. I'd like to implement the
Codeigniter php framework URLs look like the above. I'm surprised that apache maps this
CodeIgniter has a method $this->load->vars($array) that is ideally used in the parent Controller to
I use codeigniter and i want make uniqid code with php as following code(by
Okay, I'm having some serious issues here. I'm new to this site, and new
CodeIgniter allows access to POSTed data via: $this->input->post('input_name'); where 'input_name' is the name of
In CodeIgniter I'm using a base CRUD My_model , but I have this small
In Kohana/CodeIgniter, I can have a URL in this form: http://www.name.tld/controller_name/method_name/parameter_1/parameter_2/parameter_3 ... And then
Codeigniter has its own Models path, where models extend from CI_Model. I'm using RedBean

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.