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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:15:10+00:00 2026-05-29T08:15:10+00:00

If CodeIgniter has _remap() that gets called before it touches any method in a

  • 0

If CodeIgniter has _remap() that gets called before it touches any method in a controller, is there an after-method equivalent that gets called after a method is called?

The scenario is that

  1. one usually pre-checks stuff like login credentials in either the constructor or remap of that controller. this is the pre-method area.
  2. After that, one builds the page data inside a method.
  3. Then one loads and displays a view/template by calling the template parser or loading a view.

I would like to have that third step automated in somewhat an automatic after-method function which can be inherited by all my controllers so i won’t have to call the parser/loader every time i make a method?

  • 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-29T08:15:11+00:00Added an answer on May 29, 2026 at 8:15 am

    Codeigniter got a feature called “hooks“. I’m sure that’s what you looking for.

    From the hooks page;
    The following is a list of available hook points.

    pre_system
    Called very early during system execution. Only the benchmark and hooks class have been loaded at this point. No routing or other processes have happened.

    pre_controller
    Called immediately prior to any of your controllers being called. All base classes, routing, and security checks have been done.

    post_controller_constructor
    Called immediately after your controller is instantiated, but prior to any method calls happening.

    post_controller
    Called immediately after your controller is fully executed.

    display_override
    Overrides the _display() function, used to send the finalized page to the web browser at the end of system execution. This permits you to use your own display methodology. Note that you will need to reference the CI superobject with $this->CI =& get_instance() and then the finalized data will be available by calling $this->CI->output->get_output()

    cache_override
    Enables you to call your own function instead of the _display_cache() function in the output class. This permits you to use your own cache display mechanism.

    post_system
    Called after the final rendered page is sent to the browser, at the end of system execution after the finalized data is sent to the browser.

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

Sidebar

Related Questions

CodeIgniter has a method $this->load->vars($array) that is ideally used in the parent Controller to
I have a CodeIgniter MVC application. I have a model called city that has
This issue is very likely codeigniter specific. I have a controller called redirect.php that
In CodeIgniter, or core PHP; is there an equivalent of Rails's view partials and
I am working on a codeigniter site, the client has requested that the price
Has anybody tried out simpleloginsecure authentication library for codeigniter? I like that it has
I've got a CodeIgniter project that until now has been only run remotely (it
My current project has version 1.6.3 of codeigniter framework. Now there is new release
Codeigniter has its 'ENVIRONMENT' setting such that when in a production environment, by changing
I'm creating a form in CodeIgniter that has a paired value- Companies, and CEOs.

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.