public function expand($uri, $params = array())
    {
        $params += $this->params;
        $uri     = $this->base_uri.$uri;
        $result  = array();

        // quick check
        if (($start = strpos($uri, '{')) === false) {
            return $uri;
        }

        $parser = $this->parser;
        $nodes  = $parser->parse($uri);

        foreach($nodes as $node) {
            $result[] = $node->expand($parser, $params);
        }

        return implode('', $result);
    }
public function expand($uri, $params = array())
    {
        $params += $this->params;
        $uri     = $this->base_uri.$uri;
        $result  = array();

        // quick check
        if (($start = strpos($uri, '{')) === false) {
            return $uri;
        }

        $parser = $this->parser;
        $nodes  = $parser->parse($uri);

        foreach($nodes as $node) {
            $result[] = $node->expand($parser, $params);
        }

        return implode('', $result);
    }
public function expand ( $ uri , $ params = array ( ) ) { $ params += $ this -> params ; $ uri = $ this -> base_uri . $ uri ; $ result = array ( ) ; // quick check if ( ( $ start = strpos ( $ uri , '{' ) ) === false ) { return $ uri ; } $ parser = $ this -> parser ; $ nodes = $ parser -> parse ( $ uri ) ; foreach ( $ nodes as $ node ) { $ result [ ] = $ node -> expand ( $ parser , $ params ) ; } return implode ( '' , $ result ) ; }
Expands URI Template

@param string $uri  URI Template
@param array  $params        URI Template's parameters
@return string
Expands URI Template