Bert,

Logical reason is it is not awkward but correct to use the view var that was set in the controller, they are not even variables until the view "gets" them. If you need to check that your code set them, then the logical place to check is in the var itself, or like I said, since they are output variables check that the variables have been set for the view in the view.

Another suggestion create __checkVars($viewVariable); in your controller.

Something like this:

    function __checkVar($viewVariable) {
        if(in_array($viewVariable, $this->_viewVars)){
            // add your code
        } else {
            // do something else
        }
    }

And use it to check your variables.
--
/**
* @author Larry E. Masters
* @var string $userName
* @param string $realName
* @returns string aka PhpNut
* @access  public
*/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to