This post originated from an RSS feed registered with PHP Buzz
by Jason Sweat.
Original Post: 20 PHP5 Setters Should Return $this 12
Feed Title: Jason E. Sweat's weblog
Feed URL: http://blog.casey-sweat.us/?feed=rss2
Feed Description: Blogging about whatever interests me at the moment, mainly PHP, web application and Gentoo Linux.
113
I think that as a convention, I will now have all setters return $this instead of null. I arrived at this decision from messing around with the Specification design pattern ("Domain Driven Design" by Eric Evans, pg. 224). Doing so allowes me to trim several lines, and ...
10