You have few options to help yourself, without waiting for any plugin:
- learn it and remember ;)
- extend your phpDoc blocks with all available options:
Example (to be honest I don't know if Eclipse supports html in phpDoc or even any text after variable name in @param, but it works fine in Netbeans):
/**
* [...]
* @param string $type Can be: <ul><li>DateTextBox</li><li>ValidationTextBox</li></ul>
* @param string $name Whatever
* @param array|Zend_Config $options Array with following keys: <ul><li>require</li><li>invalidMessage</li></ul>
* @return Zend_Form_Element
*/
public function createElement($type, $name, $options = null)
- extend Zend class and create your own methods to simplify your work
Example:
class My_Zend_Form_Element extends Zend_Form_Element
{
public function createDateTextBox($name, $options = null)
{
return $this->createElement('DateTextBox', $name, $options);
}
}
- declare some well named constants and provide some hint in phpDoc
Example: (type ZFE_OPTIONS and IDE should show hint with some constants to use as array keys)
/**
* Can be true or false
*/
define('ZFE_OPTIONS_REQUIRE','require');
- create your own helper classes with methods to produce valid options array
Example:
class ZFE_Options
{
protected $opts = array();
/**
* @param bool $req
* @return ZFE_Options
*/
public function setRequired($req){
$this->opts['require'] = (bool)$req;
return $this;
}
/**
* @param string $txt
* @return ZFE_Options
*/
public function setInvalidMessage($txt){
$this->opts['invalidMessage'] = (string)$txt;
return $this;
}
/**
* @return array
*/
public function toArray(){
return $this->opts;
}
}
$zfe_options = new ZFE_Options();
$opts = $zfe_options
->setRequired(true)
->setInvalidMessage('Please provide valid email address')
->toArray();