I'm not sure if this is a zf or studio 10 question really, so figured i'd start here as i think its more code related.
I'm working on a new project trying to figure out the changes from zf1 to zf2, I have a few questions.
In zf1 if i wanted to dump something as debug to the browser i'd do this
- Code: Select all
Zend_Debug::Dump('this is the output");
Now, in zf2 I think i do this
- Code: Select all
use Zend\Debug\Debug;
Debug::dump("this is the output") ;
Ok, not sure why the double Debug but thats what the code completion puts in the file...
So i want a param from the request object :
In zf1,
- Code: Select all
$singleParam = $this->getRequest()->getParam("testVar");
$allParams = $this->getRequest()->_getParams();
Now in zf2,
- Code: Select all
use Zend\Http\PhpEnvironment\Request;
$singleParam = $this->getRequest()->getParam('testVar')
$allParams = ????
Is there a getParams or getAllParams?
I couldn't find the getParams or a getAllParams in zf2, this is where i'm unsure as to if this is a code thing or a studio 10 beta thing. The syntax code complete in studio doesn't see the getParam function, it only has four choices (getContent, getMetadata, setContent & setMetadata).
Anyone know why the code complete doesn't see these functions? ...maybe i'm using the wrong Request namespace?...
Is it normal to not have code completion with the namespace style programming? I haven't use namespace codeing, its all be classes.
Please toss me some crumbs

