What are the different types of hook in Codeigniter?
What are the different types of hook in Codeigniter?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
There are three hooks :
System Hooks:
Pre System
Controller Hooks
Pre Controller Hook
Post Controller Constructor Hook
Post Controller Hook
Overrides Hooks
Display Override Hook
Cache Override Hook
CodeIgniter Hooks allows you to execute a script with specific path within the CodeIgniter execution process without updating or modifying the core files.
If you need to execute a code that should run every time after Constructor of a controller is loaded, you specify that script path in hooks.
Hooks is a PHP file located in following path
application/config/hooks.php
The different types of hooks are:
{i} post_controller_constructor
{ii} pre_controller
{iii} pre_system
{iv} post_system
{v} cache_override
{vi} display_override
{vii} post_controller