src/Zicht/Bundle/UrlBundle/Twig/UrlExtension.php
public function staticRef($name, $params = null)
    {
        $name = (string)$name;
        if (!isset($this->static_refs[$name])) {
            try {
                $this->static_refs[$name] = $this->provider->url($name);
            } catch (UnsupportedException $e) {
                $this->static_refs[$name] = '/[static_reference: ' . $name . ']';
            }
        }

        $ret = $this->static_refs[$name];
        if ($params) {
            $ret .= '?' . http_build_query($params, 0, '&');
        }

        return $ret;
    }
public function staticRef($name, $params = null)
    {
        $name = (string)$name;
        if (!isset($this->static_refs[$name])) {
            try {
                $this->static_refs[$name] = $this->provider->url($name);
            } catch (UnsupportedException $e) {
                $this->static_refs[$name] = '/[static_reference: ' . $name . ']';
            }
        }

        $ret = $this->static_refs[$name];
        if ($params) {
            $ret .= '?' . http_build_query($params, 0, '&');
        }

        return $ret;
    }
public function staticRef ( $ name , $ params = null ) { $ name = ( string ) $ name ; if ( ! isset ( $ this -> static_refs [ $ name ] ) ) { try { $ this -> static_refs [ $ name ] = $ this -> provider -> url ( $ name ) ; } catch ( UnsupportedException $ e ) { $ this -> static_refs [ $ name ] = '/[static_reference: ' . $ name . ']' ; } } $ ret = $ this -> static_refs [ $ name ] ; if ( $ params ) { $ ret .= '?' . http_build_query ( $ params , 0 , '&' ) ; } return $ ret ; }
Returns a static reference, i.e. an url that is provided based on a simple string.

@param string $name
@param array  $params

@return string
Returns a static reference i . e . an url that is provided based on a simple string .