Advertisement
VladimirsBudkins

CI HMVC base controller

Oct 13th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. <?php
  2.  
  3. use Ergo\WS\DisNet as DisNet;
  4.  
  5. class BaseController extends MX_Controller {
  6.  
  7.     protected static $initialized;
  8.  
  9.     public function __construct() {
  10.         parent::__construct();
  11.         if (is_null(self::$initialized)) {
  12.             self::$initialized = true;
  13.             $this->load->models([
  14.                 'system_parameters/SystemParametersValuesModel',
  15.                 'sessions/SessionsModel',
  16.                 'logs/LogModel'
  17.             ]);
  18.             $this->config->load('svgIcons');
  19.             $this->config->load('cookiesNames');
  20.             if (ENVIRONMENT == 'development') {
  21.                 $this->load->helper('developer');
  22.             }
  23.             $this->lang->initDbLang('eng');
  24.             $this->SystemParametersValuesModel->putValuesInMemory();
  25.         }
  26.     }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement