public function __construct() { $this->_page = InRouter::getController(); $this->_theme = new InTheme(); $this->_theme->page = $this->_page; $this->_theme->path = InRouter::getContext(); $this->_theme->view = $this->_page; if ($this->_page) { $theme = $this->_theme; $project = $this; require_once IN_CONTROLLERS_PATH . '/' . InRouter::getContext() . '/' . InRouter::getController() . '.php'; } }
public function __construct($path = null) { $this->path = $path ? $path : (defined('IN_API_DEFAULT') ? IN_API_DEFAULT : null); $this->_controller = InRouter::getController(); if ($this->path && $this->_controller) { if ($this->_validateParams()) { $c = IN_CONTROLLERS_PATH . '/' . $this->path . '/' . InRouter::getController() . '.php'; if (file_exists($c)) { $api = $this; require_once $c; } } } }
public function __construct() { $this->_page = InRouter::getController(); $this->_theme = new InTheme(); $this->_theme->page = $this->_page; $this->_theme->path = InRouter::getContext(); $this->_theme->view = $this->_page; // Project dependencies $dep_path = dirname(dirname(dirname(dirname(__FILE__)))) . '/project/index.php'; if (file_exists($dep_path)) { require_once $dep_path; } // Load Controller if ($this->_page) { $theme = $this->_theme; $project = $this; require_once IN_CONTROLLERS_PATH . '/' . InRouter::getContext() . '/' . InRouter::getController() . '.php'; } }