Beispiel #1
0
 /**
  *
  * @param string $file
  * @throws RouterException
  */
 private function saveTmpRoute(string $file, array $routes)
 {
     $data = "<?php\n\nreturn [\n'checksum' => '" . $this->route->getChecksum() . "',\n'routes' => " . var_export($routes, true) . "\n];\n\n";
     if (!@file_put_contents($file, $data)) {
         throw new RouterException("Unable to save {$file}");
     }
 }