[SOLVED] dropdown box when to use get prefix

Hi,

This is a question for the experts.

On p 110 there is an example of how to change a textfield on a form to a dropDownList.

the code for it in the book works and it is shown like this:





 <?php echo $form->DropDownList($model, 'type_id', $model->getTypeOptions()); ?>




But the following change does not work:




 <?php echo $form->DropDownList($model, 'type_id', $model->TypeOptions()); ?>



I thought that the framework automatically (magically) understands it is a getter, buy the name of the function.

When is it appropriate to use -ClassInstance>getSomeValue vs. ClassInstance->SomeValue ?

Now understand that you use the FUNCTION() call with getSomeProperty() vs. the PROPERTY name without parentheses.