Ejemplo n.º 1
0
 /**
  * @see IRoute
  */
 public function decode($path)
 {
     $controllerActionParams = parent::decode($path);
     if ($controllerActionParams !== null) {
         $controllerActionParams->params['module'] = ucfirst($controllerActionParams->params['module']);
     }
     return $controllerActionParams;
 }
Ejemplo n.º 2
0
 public function testDecode_urldecoded()
 {
     $route = new Route('name', '/:var/:value', 'Controller', 'action');
     $cap = $route->decode('/this+value/%2Fmust-be-decoded');
     $this->assertNotNull($cap);
     $this->assertTrue($cap instanceof ControllerActionParams);
     $this->assertEquals(2, count($cap->params));
     $this->assertEquals('this value', $cap->params['var']);
     $this->assertEquals('/must-be-decoded', $cap->params['value']);
 }