Advertisement
luckymahrus

CodeIgniter v3.1.3 (HMVC) MY_Loader.php

Jan 30th, 2017
2,801
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1. <?php (defined('BASEPATH')) OR exit('No direct script access allowed');
  2.  
  3. /* load the MX_Loader class */
  4. require APPPATH."third_party/MX/Loader.php";
  5.  
  6. class MY_Loader extends MX_Loader
  7. {
  8.     /** Load a module view **/
  9.     public function view($view, $vars = array(), $return = FALSE)
  10.     {
  11.         list($path, $_view) = Modules::find($view, $this->_module, 'views/');
  12.  
  13.         if ($path != FALSE)
  14.         {
  15.             $this->_ci_view_paths = array($path => TRUE) + $this->_ci_view_paths;
  16.             $view = $_view;
  17.         }
  18.  
  19.         return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => ((method_exists($this,'_ci_object_to_array')) ? $this->_ci_object_to_array($vars) : $this->_ci_prepare_view_vars($vars)), '_ci_return' => $return));
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement