Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
function route($path)
{
    return Route::getPublicUrl($path);
}
Esempio n. 4
0
 protected function composerInstall()
 {
     return (new Repository\Composer(Route::getBasePath(), true))->install()->getShellAndLog();
 }
Esempio n. 5
0
 protected function publicAsset($file)
 {
     return Route::getPublicUrl('/storage/assets/' . ltrim($file, '/'));
 }
Esempio n. 6
0
 private function git()
 {
     return new Repository\Git(Route::getBasePath());
 }
Esempio n. 7
0
 public function __construct()
 {
     $this->path = Router\Route::getTemplatePath();
 }
Esempio n. 8
0
 private function getLogFile()
 {
     return Route::getStoragePath('/logs/' . microtime(true) . '-' . uniqid());
 }