Question

I have on many ocasions code which works with results from the client loader.
In our application we always have code like

  $serviceManager = new ServiceManagerComposite(new   ConfigurationComposite($configuration['service_manager']));
                $serviceManager->setService('ApplicationConfiguration', $configuration);
                $serviceManager->setAllowOverride(true);
                $clientLoader = $serviceManager->get('ClientLoad');
                $clientLoader->switchClient($client_module['module_name']);

Now we have a slay of things which get retrived via:

  $WhateverTheNever = $serviceManager->get('WhateverTheNever');

My question is, how can i tell intell sense via

/**
 * 
 * @return type
 */

In the get() function from ZF so it can gues all the classes it can return?

The goal is to get Intel sense on $WhateverTheNever after it gets retrived from the service manager. Can i somhow note it like @return classA, ClassB...?

If it hellps, i use Netbeans 7.4 for development.

Was it helpful?

Solution

The @return tag does allow for multiple types to be listed: "@return classA|classB|classC". Use the pipe as the delimiter rather than the comma.

(http://www.phpdoc.org/docs/latest/for-users/phpdoc/tags/return.html)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top