News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

David Walsh's Blog:
Using PHP Generic Objects To Organize Your Code
December 07, 2007 @ 07:52:00

David Walsh has put together and posted a class he's created around creating generic objects to help with code organization.

I like using PHP classes to keep my code organized and easy to maintain. I know that they consume more memory than simply using an array or variable system, but if memory is an issue, I'd get more memory. Saving time by coding in a maintainable fashion is more important to me than upgrading a server. I've written a very generic, flexible PHP class that I use in my PHP code to get and set variables for use within the page.

His class is included as are two example of its use - a basic option that sets properties on the object and an example of its use with a database, parsing the results into an object with a load() call.

3 comments voice your opinion now!
generic object class example organize generic object class example organize


blog comments powered by Disqus

Similar Posts

Alexey Zakhlestin's Blog: Syck 0.9.2

Evan Coury's Blog: Using Zend\Dbs TableGateway & HydratingResultSet to return rows as custom enties

IBM developerWorks: Five common PHP design patterns

Yet Another Web Development Blog: A PHP Developer Spends a Week with Python

Ian Selby's Blog: Put Your PHP App on Steroids - Optimizing with APC Cache


Community Events











Don't see your event here?
Let us know!


overview composer opinion hhvm security hack package facebook example podcast framework code unittest symfony2 release application introduction language install component

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework