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)); }
public function __invoke($param = null, $default = null) { $request = $this->getController()->getRequest(); $routeMatch = $this->getController()->getEvent()->getRouteMatch(); return LegacyParams::staticGetParam($routeMatch, $request, $param, $default); }