Craig Slusher wrote:
> I use Zend_Filter_Input to process my $_POST data. If I want to
> find out if a certain button was clicked, what is the best way
> to check?
>
> if ($post->getRaw('btnSave') !== false) { ... }
>
> Is this the correct way to check for button clicks?
I think you're asking how to tell if a key exists. If so, there is a
method called keyExists() that will perform this check for you.
On a related note, I wish this method were named something like isKey()
to better conform to the existing naming convention. I've been hesitant
to enter this as a bug, but perhaps others agree.
(I think the strict naming convention is one of the benefits of using ZF
for this stuff.)
Chris