context = $context; } public function match($pathinfo) { $allow = array(); $pathinfo = rawurldecode($pathinfo); $context = $this->context; $request = $this->request; // localpickup.configure if ($pathinfo === '/admin/module/localpickup/configure') { if ($this->context->getMethod() != 'POST') { $allow[] = 'POST'; goto not_localpickupconfigure; } return array ( '_controller' => 'LocalPickup\\Controller\\SetDeliveryPrice::configure', '_route' => 'localpickup.configure',); } not_localpickupconfigure: throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException(); } }