* @copyright 2012-2013 Jurian Sluiman. * @license http://www.opensource.org/licenses/bsd-license.php BSD License * @link http://juriansluiman.nl */ namespace SlmLocale\Service; use Interop\Container\ContainerInterface; use SlmLocale\Locale\Detector; use SlmLocale\View\Helper\LocaleUrl; class LocaleUrlViewHelperFactory { public function __invoke(ContainerInterface $container) { $detector = $container->get(Detector::class); $request = $container->get('Request'); $app = $container->get('Application'); $match = $app->getMvcEvent()->getRouteMatch(); $helper = new LocaleUrl($detector, $request, $match); return $helper; } }