What is the ZF2 equivalent of the Request::getPathInfo() method from ZF1?
$request = new \Zend\Http\PhpEnvironment\Request();
var_dump($request->getUri());
object(Zend\Uri\Http)[5]
protected 'validHostTypes' => int 19
protected 'user' => null
protected 'password' => null
protected 'scheme' => string 'http' (length=4)
protected 'userInfo' => null
protected 'host' => string 'localhost' (length=9)
protected 'port' => null
protected 'path' => string '/iptcms/public_html/test.php' (length=28)
protected 'query' => string '' (length=0)
protected 'fragment' => null
You can get path info from the Uri instance easily which accesible via Request instance.
In any controller action;
$path = $this->getRequest()->getUri()->getPath();
For more details, look over the Zend\Uri and Zend\Http\Request classes.