original_string: public function getMethodsByRoute($route)
      {
          // Check if a route was provided
          if (!$route) {
              return [];
          }
  
          // Loop through our routes
          $methods = [];
          foreach ($this->routes as $method => $routes) {
              foreach ($routes as $availableRoute => $callable) {
                  // Check if the available route is the same as the specified route
                  if ($availableRoute === $route) {
                      $methods[] = $method;
                      continue 2;
                  }
  
                  // Check if the route matches
                  $regex = '/^' . str_replace('/', '\/', $availableRoute) . '/Uim';
                  if (preg_match($regex, $route, $matches) === 1 && $matches[0] === $route) {
                      $methods[] = $method;
                      continue 2;
                  }
              }
          }
  
          // Return the methods array
          return $methods;
      }
code: public function getMethodsByRoute($route)
      {
          // Check if a route was provided
          if (!$route) {
              return [];
          }
  
          // Loop through our routes
          $methods = [];
          foreach ($this->routes as $method => $routes) {
              foreach ($routes as $availableRoute => $callable) {
                  // Check if the available route is the same as the specified route
                  if ($availableRoute === $route) {
                      $methods[] = $method;
                      continue 2;
                  }
  
                  // Check if the route matches
                  $regex = '/^' . str_replace('/', '\/', $availableRoute) . '/Uim';
                  if (preg_match($regex, $route, $matches) === 1 && $matches[0] === $route) {
                      $methods[] = $method;
                      continue 2;
                  }
              }
          }
  
          // Return the methods array
          return $methods;
      }
code_tokens: public function getMethodsByRoute ( $ route ) { // Check if a route was provided if ( ! $ route ) { return [ ] ; } // Loop through our routes $ methods = [ ] ; foreach ( $ this -> routes as $ method => $ routes ) { foreach ( $ routes as $ availableRoute => $ callable ) { // Check if the available route is the same as the specified route if ( $ availableRoute === $ route ) { $ methods [ ] = $ method ; continue 2 ; } // Check if the route matches $ regex = '/^' . str_replace ( '/' , '\/' , $ availableRoute ) . '/Uim' ; if ( preg_match ( $ regex , $ route , $ matches ) === 1 && $ matches [ 0 ] === $ route ) { $ methods [ ] = $ method ; continue 2 ; } } } // Return the methods array return $ methods ; }
docstring: Returns an array of methods defined for a specific route.
  Useful for an "OPTIONS" request.
  
  @param string $route The route to get the methods from.
  
  @return array An array with methods.
docstring_tokens: Returns an array of methods defined for a specific route . Useful for an OPTIONS request .