Another question I have is will I ever be able to get intelliense in this scenario?

$artist = new Zend_Form_Element_Text('artist');
$artist->setLabel('Artist')
->setRequired(true)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty');

the first ->setLabel has intellisence but nothing else in the chain does.

Best regards,

JD Smith

juanc says:

Does SetLabel has a PhpDoc comment with a return type? This is needed for chaining.

jdsmith2816 says:

/**
* Set element label
*
* @param string $label
* @return Zend_Form_Element
*/
public function setLabel($label)
{

That doesn't seem to be the problem..

Best regards,

JD Smith
Programmer
Integrated Network Solutions

zibtech says:

I just noticed this problem with our framework (http://n2framework.com/) and was hoping it could be fixed up. I have no problems with other IDE's like Zend Studio, but quite frankly they suck, so I'd rather see it added here.

Thanks,

Andrew Male
Developer
ZibTech Consulting

juanc says:

Do you have a specific example of when this happens on your framework?

zibtech says:

Sure. We built a simple template system that we use and we allow chaining some of its commands together as such:

<?php
  $tpl
= new n2f_template('dynamic');
 
$tpl->setModule('account')->setFile('index');
 
// more here
?>

There are a few more examples (we also just implemented singletons into the framework, but that isn't released yet) so let me know if you need more examples.

Andrew

juanc says:

Are all these methods have @return in their PhpDoc comments?

zibtech says:

Yes, they do. If you'd like to see the latest source code let me know and I can provide a copy.