View Single Post
Old 08-28-2012, 12:45 PM  
isteve
Confirmed User
 
isteve's Avatar
 
Industry Role:
Join Date: Jun 2012
Location: Saint-Jean-sur-Richelieu (near Montreal)
Posts: 191
You should really listen to the commentors on your blog post: http://edgeprod.com/blog/46/coding-sample/

You are really appending data to a non-declared variable. The $returnText variable inside the getHelloText method doesn't use the class scope. It uses the method scope. To make it use the class scope you'll need to replace $returnTex by $this->returnText.... oh and before appending data to a variable, you must FIRST set data to it.

Also, instead of returning the Exceptions in strings, you should probably learn to throw Exceptions. Would make your code easier to maintain...

Your class member ($returnText) is also public. That is a mistake, right?

Anyway, good luck finding a project. Gotta love code hackers.

Last edited by isteve; 08-28-2012 at 12:56 PM..
isteve is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote