zend framework - PhP documentator document return object types -


i have \zend\servicemanager\servicemanager instance in code , function being returned function wich using function it.

like:

$servicemanager->get('webuser')->intelsensehere() $servicemanager->get('email')->intelsenseherelol() $servicemanager->get('horses')->intelsensehereheeere() 

now thouse classes can returned 1 call... how document function call calling?

because have intel sense helper nb 7.4 rc2 , pretty clever , reacts return document variable, specify adapters can return.

is there way specify classes cann return??

like:

/**  *   * @param \zend\servicemanager\servicemanager $servicemanager  * @param array $user  * @return boolean, \zend\servicemanager\servicemanager, horseadapter...  */ 

is there correct syntax that?

using servicemanager::get($service) return instance of service requested.

so, using 1 of examples:

$servicemanager->get('webuser')->dosomething(); 

is same as:

$webuserservice = $servicemanager->get('websuer'); $webuserservice->dosomething(); 

you should therefore add docblock annotation @return webuser::dosomething() method, not servicemanager::get()

the code completion depend entirely on ide, believe work in netbeans.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -