From: Jason S. <jsw...@ya...> - 2003-01-16 17:47:35
|
Just an additional correction on this subject > Also, where a method returns an object, should it be: > > return &$object; really should be function &ReturnObj() { return $this->_Obj; } with the & on the function declaration line, not in the return line. Jason --- Jason Sweat <jsw...@ya...> wrote: > Phrame list members, > > I have not used PHP's OO extensively. As I understand, PHP is different than > most other languages in that objects assignments are copies of the object > rather than references to the object by default, which contrasts with most > other OO languages (and I believe PHP5 is changing this behavior). > > If this behavior is correct, should most of the functions in phrame be > explicitly defined as by reference? > > For example, in the Action class, should we: > > class Action extends Object > { > function perform(&$actionMapping, &$actionForm) {} > } > > Also, where a method returns an object, should it be: > > return &$object; > ?? > > Does anyone have knowledge in this regard? > > Thanks, > > Jason > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |