Local::__construct PHP Method

__construct() public method

public __construct ( )
    public function __construct()
    {
        parent::__construct();
        // calls the constructor
        $this->load->model('Locations_model');
        $this->load->model('Pages_model');
        $this->load->model('Reviews_model');
        $this->load->library('location');
        // load the location library
        $this->load->library('currency');
        // load the currency library
        $this->lang->load('local');
    }

Usage Example

示例#1
0
 /**
  * Construct a Home storage instance
  * @param array $arguments array with "user" containing the
  * storage owner and "legacy" containing "true" if the storage is
  * a legacy storage with "local::" URL instead of the new "home::" one.
  */
 public function __construct($arguments)
 {
     $this->user = $arguments['user'];
     $datadir = $this->user->getHome();
     if (isset($arguments['legacy']) && $arguments['legacy']) {
         // legacy home id (<= 5.0.12)
         $this->id = 'local::' . $datadir . '/';
     } else {
         $this->id = 'home::' . $this->user->getUID();
     }
     parent::__construct(array('datadir' => $datadir));
 }
All Usage Examples Of Local::__construct