codeigniter - overwrrite code igniter Common.php -
there method in code igniter under system/core/common.php called load_class().
i overwrite method. overwrite code igniter class create file such my_common.php in case common.php collection of methods , there no classes encapsulates them.
so how do this?
there's no officially supported way built in extending mechanisms. consider other way achieve goal.
however functions inside common.php
wrapped inside if
checking if function exists or not can following:
- create
my_common.php
put somewhere in project (maybeapplication/core/
mirror other similar extends) - open
index.php
file in root of project - insert
include apppath.'core/my_common.php';
before closing
require_once basepath.'core/codeigniter.php';
line
now if have have load_class
function in my_common.php
shadow original version.
Comments
Post a Comment