private static function rewritePath($options)
 {
     foreach (self::$reservedOptions as $opt) {
         unset($options[$opt]);
     }
     if (isset($options['params'])) {
         foreach ($options['params'] as $key => $value) {
             $options[$key] = $value;
         }
         unset($options['params']);
     }
     list($path, $extraKeys) = SRoutes::generate($options);
     if (!empty($extraKeys)) {
         $path .= self::buildQueryString($extraKeys);
     }
     return $path;
 }