Well, when designing some modules there is a possibility for them to default to a value, or set a value.
For instance, I'll have a view which may or may not have an id to be passed to it. In the Zend Framework, their filters will return false if the value is not valid.
Code: Select all
if (($newsId = $filtered->testDigits('newsid')) == false)
{
//invalid paramater
}
$this->view->paintNewsArticle($newsId);
$this->view->paintNewsComments($newsId);- Set the default value when I know its an invalid paramter (indicated by the comment)
- Keep the false value, and pass the variable
- Pass nothing to the view and let it check the simple logic
Not really a big deal, but I am wondering if anyone has any thought on this?