/** * Function which will be automaticly loaded * Execute the component */ public function _execute() { $routing = new PWEL_ROUTING(); $relativePath = $routing->requestRelativePath(); if (self::$visible == true && PWEL_ROUTING::$controllerNotFound == false) { PWEL_ROUTING::autoSearch('app/views/', self::$file); #var_dump(PWEL_ROUTING::$searchResult); $path = $relativePath . PWEL_ROUTING::$searchResult . self::$file; if (file_exists($path)) { $this->display(self::$file, (array) self::$variables); } else { throw new Exception("File: <i>{$path}</i> doenst exist.<br /> <strong>Using '" . "PWEL_ROUTING::\$namespaceRange' and missing adding " . "directory to file?</strong>"); } } }