private function loadConfig()
 {
     $parser = new YAMLParser($this->logger);
     $parser->setFilePath(__SITE_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'credentials.yml');
     $this->config = $parser->loadConfig();
     unset($parser);
 }
 /**
  * Step 1
  *
  * getInitialRouting     determines which of the routing files to refer to for config instructions
  * 
  * @param string    requestURI - the uri we are looking up
  * 
  * @return string   the filepath to use
  */
 public function getInitialRouting($requestURI)
 {
     $parser = new YAMLParser($this->logger);
     $pieces = array_filter(explode('/', $requestURI));
     $parser->setFilePath(__SITE_PATH . '/app/config/routing.yml');
     $chunk = array_shift($pieces);
     if ($chunk == 'admin') {
         $chunk = array_shift($pieces);
     }
     $config = $parser->loadConfig();
     unset($parser);
     if (!array_key_exists($chunk, $config)) {
         throw new URINotFoundException($chunk . ' does not exist in YML configuration');
     }
     //return the first path
     foreach ($config[$chunk] as $key => $path) {
         return str_replace('routing', 'views', $path);
     }
 }
 public function loadConfig($filename)
 {
     $parser = new YAMLParser($this->logger);
     $parser->setFilePath(__SITE_PATH . '/app/config/' . $filename . '.yml');
     return $parser->loadConfig();
 }