How to add wiredesignz modular extension to codeigniter 3.0

I am trying to add a third-party extension to create an HMVC application using Codeigniter 3.0

But when I add files to MY_Loaderboth MY_Routerthe main folder and the MX folder in the folder Third_party, it generates a fatal error:

Fatal error: calling the undefined method MY_Loader :: _ ci_object_to_array () in C: \ xampp \ htdocs \ codeigniter \ application \ third_party \ MX \ Loader.php on line 300.

When I delete them, the application works fine. Are there any additional settings necessary to run the application?

+4
source share
4 answers

, , MX/Loader.php, CodeIgniter.

Loader.php

protected function _ci_object_to_array($object) {
    return is_object($object) ? get_object_vars($object) : $object;
}

+7

/third _party/MX/Loader.php

protected function _ci_object_to_array($object) {
    return is_object($object) ? get_object_vars($object) : $object;
}

Loader.

+1

/third _party/MX/Loader.php .

public function ($ view, $vars = array(), $return = FALSE) ... ( 300)

return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));

if (method_exists($this, '_ci_object_to_array'))
{
        return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));
} else {
        return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_prepare_view_vars($vars), '_ci_return' => $return));
}

, wiredesignz . .

0

300 /third _party/MX/Loader.php

CI 3.1.3

 return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));

.

return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_prepare_view_vars($vars), '_ci_return' => $return));
}
0

Source: https://habr.com/ru/post/1667119/


All Articles