public function __construct() { $this->applicationPath = realpath(Request::getRequest()['DOCUMENT_ROOT'] . '/../'); $this->className = get_class($this); if (end(explode('\\', $this->className)) !== 'BaseController') { $this->viewPath = $this->getClassParams()->getShortName(); } }
/** * @param array $config */ public function __construct($config = []) { $this->config = $config; $this->request = Request::getRequest(); require 'Autoloader.php'; }