symfony API

sfRequestRoute Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.2 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.2 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfRequestRoute represents a route that is request aware.

Inheritence

sfObjectRoute  <  sfRequestRoute  <  sfRoute

Method Summary

  • string generate($params, $context = array(), (Boolean) $absolute = false)
    Generates a URL from the given parameters.
  • Boolean matchesParameters($params, $context = array())
    Returns true if the parameters match this route, false otherwise.
  • array matchesUrl($url, $context = array())
    Returns true if the URL matches this route, false otherwise.
  • __construct($pattern, $defaults = array(), $requirements = array(), $options = array())
    Constructor.

Methods inherited from sfRoute

bind , compile , compileForSeparator , compileForText , compileForVariable , fixDefaults , fixRequirements , fixSuffix , generate , generateStarParameter , generateWithTokens , getDefaultOptions , getDefaultParameters , getDefaults , getOptions , getPattern , getRegex , getRequirements , getTokens , getVariables , hasStarParameter , initializeOptions , isBound , matchesParameters , matchesUrl , mergeArrays , parseStarParameter , postCompile , preCompile , serialize , setDefaultOptions , setDefaultParameters , tokenize , tokenizeBufferAfter , tokenizeBufferBefore , unserialize , __construct

Method Details

  • (string) generate ($params, $context = array(), (Boolean) $absolute = false) Browse code

    $params The parameter values
    $context The context
    $absolute Whether to generate an absolute URL

    Generates a URL from the given parameters.

    returns The generated URL

  • (Boolean) matchesParameters ($params, $context = array()) Browse code

    $params The parameters
    $context The context

    Returns true if the parameters match this route, false otherwise.

    returns true if the parameters match this route, false otherwise.

  • (array) matchesUrl ($url, $context = array()) Browse code

    $url The URL
    $context The context

    Returns true if the URL matches this route, false otherwise.

    returns An array of parameters

  • __construct ($pattern, $defaults = array(), $requirements = array(), $options = array()) Browse code

    $pattern
    $defaults
    $requirements
    $options

    Constructor.


    Applies a default sf_method requirements of GET or HEAD.

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.