BaseUrl sees a helper not working on ZendFramework 2

I am testing a new Zend Framework 2, and I found a problem when trying to use the helper baseUrl helper, I get the following error when calling $this->baseUrl() inside my phtml view file;

Debug error:

C: \ Zend \ ZendServer \ share \ ZendFramework2 \ Library \ Zend \ ServiceManager \ ServiceManager.php line 424 - Exception exception 'Zend \ ServiceManager \ Exception \ ServiceNotFoundException' with the message 'Zend \ ServiceManager \ ServiceManager :: get failed to get or create instance for baseUrl 'in C: \ Zend \ ZendServer \ share \ ZendFramework2 \ Library \ Zend \ ServiceManager \ ServiceManager.php: 424

+2
php zend-framework2
source share
1 answer

It looks like a function ZF1, ZF2 has a helper function Zend \ View \ Helper \ BasePath

in the view $ this-> basePath ();

+13
source share

All Articles