buildUrl() public method

Build a URL path based on a route name and associated parameters.
public buildUrl ( string $name, array $parameters = [], $baseUrl = null )
$name string
$parameters array
示例#1
0
 public function testInterpolationFailsWithStarRoutes()
 {
     $router = new Routing\Router();
     $router->connect('/{fruit}/*', 'fruit');
     $this->setExpectedException('Ergo\\Routing\\Exception');
     $router->buildUrl('fruit', array('fruit' => 'apple'));
 }