cagartner
9/20/2013 - 2:31 PM

Pegar URL completa no controller ZF2

Pegar URL completa no controller ZF2

$event = $this->getEvent();
        $request = $event->getRequest();
        $router = $event->getRouter();
        $uri = $router->getRequestUri();
        $caminho_novo = sprintf('%s://%s%s', $uri->getScheme(), $uri->getHost(), $request->getBaseUrl());