2009年6月16日星期二

Re: [fw-mvc] get and set accessors

Cool - thanks Matthew =)
 
Make sure you're at the minimum defining the properties you'll be
setting within your class:

   class Foobar extends Foo
   {
       protected $_bar;
   }

This will ensure that it doesn't attempt to hit __set() from within your
setter, as the property has been declared (even though it has no value).

没有评论: