Current path: home/webdevt/cryptoimpot.fr/module/Application/src/View/Helper/
?? Go up: /home/webdevt/cryptoimpot.fr/module/Application/src/View
<?php
namespace Application\View\Helper;
use Laminas\View\Helper\AbstractHelper;
use Laminas\ServiceManager\ServiceLocatorAwareInterface;
class CurrentParameters extends AbstractHelper implements ServiceLocatorAwareInterface
{
public function __invoke()
{
$services = $this->getServiceLocator()->getServiceLocator();
$router = $services->get('router');
$request = $services->get('request');
$routeMatch = $router->match($request);
return $routeMatch->getParams();
}
public function getServiceLocator()
{
return $this->serviceLocator;
}
public function setServiceLocator(\Laminas\ServiceManager\ServiceLocatorInterface $serviceLocator)
{
$this->serviceLocator = $serviceLocator;
return $this;
}
}