php - code igniter Modular Extensions - Access level to MX_Router::_set_default_controller() must be public (as in class CI_Router) -
i popular modular extensions - hmvc installed from
https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc
and set codeigniter 2.2.2 but when should working fine, error
access level mx_router::_set_default_controller() must public (as in class ci_router) in c:..\application\third_party\mx\router.php on line 241
solution 1
i had change several methods visibility in router.php , changed following methods protected
public
fixed
_set_default_controller() _set_request() _set_default_controller()
and worked warning above familiar welcome codeigniter message
message: undefined property: my_router::$translate_uri_dashes
so wrapped property around if not empty bypass property
if(!empty($this->translate_uri_dashes)) { if ($this->translate_uri_dashes === true) { foreach(range(0, 2) $v) { isset($segments[$v]) && $segments[$v] = str_replace('-', '_', $segments[$v]); } } }
and works!
solution 2
there ready hmvc-ci can downloaded from
but it's ci 2.0.3 version not ci 2.2.2
solution 3 (best)
if place core files (my_loader , my_router) , third-party folder (mx) preconfigured version of ci 2.0.3 (link above) inside corresponding locations in ci 2.2.2 work fine.
Comments
Post a Comment