Пример #1
0
 public function testReturnsArrayMergedFromAllSourcesInProperOrderWhenParameterNameOmitted()
 {
     $legacyParams = new LegacyParams($this->routeMatch, $this->request);
     $expected = array('all' => 'route', 'query_and_post' => 'query', 'post_only' => 'post');
     $this->assertEquals($expected, $legacyParams->getParam());
     $this->assertEquals($expected, LegacyParams::staticGetParam($this->routeMatch, $this->request));
 }
Пример #2
0
 public function __invoke($param = null, $default = null)
 {
     $request = $this->getController()->getRequest();
     $routeMatch = $this->getController()->getEvent()->getRouteMatch();
     return LegacyParams::staticGetParam($routeMatch, $request, $param, $default);
 }