Some not written rules:

2009/5/14 Саша Стаменковић <[email protected]>
>
> 1. Many methods and constructors, are poorly documented.
> by looking at this, I don't know what are the possible options, which keys
> can it have and what do they mean? Is there any simple way to find out?
> (There are many wxamples like this Zend_Db::factory...)
>

In many classes, like Zend_Form for instance, the options array has keys
that corresponds to the set*() methods of the object.


> 3. It's fine to have constants instead hardcoded strings sometimes:
>
> $form->addElement('text', 'username');
>
> $username->addValidator('alnum');
>
> These are really not constants: I believe it's more correct to write:
$form->addElement('Text', 'username');
$username->addValidator('Alnum');
as Text and Alnum are the basename of the Zend_Form_Element and
Zend_Validate classes respectively (more generally: the basename of classes
in the specified plugin paths, there can be also My_Element_Text and
My_Validator_Alnum if prefix/path are correctly set).


-- 
Giorgio Sironi
Piccolo Principe & Ossigeno Scripter
http://ossigeno.sourceforge.net



-- 
Giorgio Sironi
Piccolo Principe & Ossigeno Scripter
http://ossigeno.sourceforge.net

Reply via email to