Ejemplo n.º 1
0
 protected function checkMethods()
 {
     if ($this->container->getEnvironment() == "prod") {
         return $this->getMethodsCache();
     }
     $config = $this->createMethodsCache();
     return $config;
 }
Ejemplo n.º 2
0
 private function getRoutingConfig()
 {
     $file = 'route/routing.php';
     if ($this->container->getEnvironment() == "prod") {
         if (\FileCache::isExist($file)) {
             return \FileCache::get($file);
         }
     }
     $sources = \Config::get('routing::source');
     $routings = [];
     foreach ($sources as $source) {
         $routing = (include_once "src/{$source}/routing.php");
         if ($routing) {
             $routings = array_merge($routings, $routing);
         }
     }
     \FileCache::set($file, $routings);
     return $routings;
 }