Hi all,

I'm using Zend_Filter_Input on my magic getter / setter methods to validate
my input and cast fields to the type I desire.
The validation portion is working great, but it's like the filters aren't
working at all.

My model, with Zend_Filter_Input logic, is here:

http://pastebin.com/m7950c5a0

Example output is here:

object(MyApp_Model_User)#19 (1) {
  ["_data:protected"]=>
  array(15) {
    ["id"]=>
    string(1) "4"
    ["email"]=>
    string(19) "[email protected]"
    ["password"]=>
    string(32) "594851275f207072b172d7508f037d78"
    ["username"]=>
    string(6) "abaird"
    ["first"]=>
    string(4) "Andy"
    ["last"]=>
    string(5) "Baird"
    ["phone"]=>
    string(10) "1112223333"
    ["email_opt_in"]=>
    int(1)
    ["zip"]=>
    string(5) "55555"
    ["birthyear"]=>
    string(4) "1984"
    ["gender"]=>
    string(4) "male"
    ["activated"]=>
    int(1)
    ["date_joined"]=>
    string(10) "2008-03-11"
    ["admin"]=>
    string(1) "1"
    ["active"]=>
    string(1) "1"
  }
}


I can't figure out if it's a usage error, but I've tried tracing through the
code and can't figure out why the filters don't seem to be applying.

Any insight on this would be appreciated!

-Andy

Reply via email to