symfony API

sfRoute 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.

sfRoute represents a route.

Inheritence

sfRequestRoute  <  sfRoute

Method Summary

  • bind($context, $parameters)
    Binds the current route for a given context and parameters.
  • compile()
    Compiles the current route instance.
  • compileForSeparator($separator, $regexSeparator)
  • compileForText($separator, $text)
  • compileForVariable($separator, $name, $variable)
  • fixDefaults()
  • fixRequirements()
  • fixSuffix()
  • string generate($params, $context = array(), (Boolean) $absolute = false)
    Generates a URL from the given parameters.
  • generateStarParameter($url, $defaults, $parameters)
  • generateWithTokens($parameters)
    Generates a URL for the given parameters by using the route tokens.
  • getDefaultOptions()
  • getDefaultParameters()
  • array getDefaults()
    Returns the compiled defaults.
  • array getOptions()
    Returns the compiled options.
  • string getPattern()
    Returns the compiled pattern.
  • string getRegex()
    Returns the compiled regex.
  • array getRequirements()
    Returns the compiled requirements.
  • array getTokens()
    Returns the compiled tokens.
  • array getVariables()
    Returns the compiled variables.
  • hasStarParameter()
  • initializeOptions()
  • Boolean isBound()
    Returns true if the form is bound to input values.
  • Boolean matchesParameters($params, $context = array())
    Returns true if the parameters matches this route, false otherwise.
  • array matchesUrl($url, $context = array())
    Returns true if the URL matches this route, false otherwise.
  • mergeArrays($arr1, $arr2)
  • parseStarParameter($star)
  • postCompile()
    Post-compiles a route.
  • preCompile()
    Pre-compiles a route.
  • serialize()
  • setDefaultOptions($options)
  • setDefaultParameters($parameters)
  • tokenize()
    Tokenizes the route.
  • Boolean tokenizeBufferAfter(&amp;$buffer, &amp;$tokens, &amp;$afterASeparator, &amp;$currentSeparator, $buffer, $tokens, (Boolean) $afterASeparator, $currentSeparator)
    Tokenizes the buffer after default logic is applied.
  • Boolean tokenizeBufferBefore(&amp;$buffer, &amp;$tokens, &amp;$afterASeparator, &amp;$currentSeparator, $buffer, $tokens, (Boolean) $afterASeparator, $currentSeparator)
    Tokenizes the buffer before default logic is applied.
  • unserialize($data)
  • __construct($pattern, $defaults = array(), $requirements = array(), $options = array())
    Constructor.

Method Details

  • bind ($context, $parameters) Browse code

    $context The context
    $parameters The parameters

    Binds the current route for a given context and parameters.

  • compile () Browse code

    Compiles the current route instance.

  • compileForSeparator ($separator, $regexSeparator) Browse code

    $separator
    $regexSeparator

  • compileForText ($separator, $text) Browse code

    $separator
    $text

  • compileForVariable ($separator, $name, $variable) Browse code

    $separator
    $name
    $variable

  • fixDefaults () Browse code

  • fixRequirements () Browse code

  • fixSuffix () Browse code

  • (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

  • generateStarParameter ($url, $defaults, $parameters) Browse code

    $url
    $defaults
    $parameters

  • generateWithTokens ($parameters) Browse code

    $parameters An array of parameters

    Generates a URL for the given parameters by using the route tokens.

  • getDefaultOptions () Browse code

  • getDefaultParameters () Browse code

  • (array) getDefaults () Browse code

    Returns the compiled defaults.

    returns The compiled defaults

  • (array) getOptions () Browse code

    Returns the compiled options.

    returns The compiled options

  • (string) getPattern () Browse code

    Returns the compiled pattern.

    returns The compiled pattern

  • (string) getRegex () Browse code

    Returns the compiled regex.

    returns The compiled regex

  • (array) getRequirements () Browse code

    Returns the compiled requirements.

    returns The compiled requirements

  • (array) getTokens () Browse code

    Returns the compiled tokens.

    returns The compiled tokens

  • (array) getVariables () Browse code

    Returns the compiled variables.

    returns The compiled variables

  • hasStarParameter () Browse code

  • initializeOptions () Browse code

  • (Boolean) isBound () Browse code

    Returns true if the form is bound to input values.

    returns true if the form is bound to input values, false otherwise

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

    $params The parameters
    $context The context

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

    returns true if the parameters matches 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

  • mergeArrays ($arr1, $arr2) Browse code

    $arr1
    $arr2

  • parseStarParameter ($star) Browse code

    $star

  • postCompile () Browse code

    Post-compiles a route.

  • preCompile () Browse code

    Pre-compiles a route.

  • serialize ()

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.