/**
  * Create service.
  *
  * @param ServiceLocatorInterface $serviceLocator
  *
  * @return QueryUrl
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $request = $serviceLocator->getServiceLocator()->get('Request');
     $helper = new QueryUrl($request);
     $router = $serviceLocator->getServiceLocator()->get('Router');
     $match = $serviceLocator->getServiceLocator()->get('Application')->getMvcEvent()->getRouteMatch();
     if ($match instanceof RouteMatch) {
         $helper->setRouteMatch($match);
     }
     $helper->setRouter($router);
     return $helper;
 }