private function parseUrl($url) { $url = parse_url($url); $path = array_filter(explode('/', str_replace(Route::getPublicPath(), '', $url['path']))); $url['controller'] = $this->parseController(array_shift($path)); $url['method'] = $this->parseMethod(array_shift($path)); $url['arguments'] = $path; $url['query'] = isset($url['query']) ? $url['query'] : ''; parse_str($url['query'], $url['query']); return $url; }
private static function loadFile($key) { $path = Route::getConfigPath(); $config = array(); if (is_file($file = $path . '/' . $key . '.php')) { $config = (require $file); } if (is_file($file = $path . '/custom/' . $key . '.php')) { $config = array_replace($config, require $file); } return $config; }
function route($path) { return Route::getPublicUrl($path); }
protected function composerInstall() { return (new Repository\Composer(Route::getBasePath(), true))->install()->getShellAndLog(); }
protected function publicAsset($file) { return Route::getPublicUrl('/storage/assets/' . ltrim($file, '/')); }
private function git() { return new Repository\Git(Route::getBasePath()); }
public function __construct() { $this->path = Router\Route::getTemplatePath(); }
private function getLogFile() { return Route::getStoragePath('/logs/' . microtime(true) . '-' . uniqid()); }