예제 #1
0
 /**
  * Reads the routes from the provided file
  * @param zibo\library\filesystem\File $file
  * @return array Array with Route objects as value and their path as key
  */
 private function readRoutesFromFile(File $file)
 {
     $dom = new Document();
     $relaxNg = $this->zibo->getConfigValue(self::CONFIG_RNG);
     if ($relaxNg) {
         $dom->setRelaxNGFile($relaxNg);
     }
     $dom->load($file);
     return $this->getRoutesFromElement($file, $dom->documentElement);
 }