Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- /**
- * Description of mainController
- *
- * @author fabi0
- */
- namespace Load;
- class Controller {
- /**
- *
- * @var \Models\Database
- */
- protected $_databaseInstance;
- public function __construct() {
- $this->_databaseInstance = new \Models\Database(\Models\Config::mysql_host, \Models\Config::mysql_dbName, \Models\Config::mysql_username, \Models\Config::mysql_password);
- $sess = new \Models\Sessions($this->_databaseInstance);
- $sess->start_session(\Models\Config::cookie_session_name, false);
- }
- protected function render($path, $data = array()) {
- $data['baseUrl'] = \Models\Config::base_url;
- include "Views/" . $path . '.php';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement