12-20-2009, 11:54 AM
|
#13 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,324
Thanks: 5
|
Hi Jarod, a better option (in my opinion) would be to make use of the class hierarchy rather than doing everything in one class.
E.g. (just snippets)
PHP Code:
class Person {
protected $name;
public function set_name($name) {
return $this->name = $name;
}
}
class ChainablePerson extends Person {
public function set_name($name) {
parent::set_name($name);
return $this;
}
}
|
|
|
|