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

DevShed:
Enhancing a URL Handling Helper Class in PHP 5
August 11, 2009 @ 08:37:47

DevShed continues their look at making helpers in PHP5 classes with this new part of the series - updating their previous URL helper to change it over to a static class.

As you'll possibly recall, all of the methods of the class were called initially inside the object context, that is dynamically, which may lead to the creation of an unnecessary instance of the helper class. So, to solve this issue quickly, in this chapter of the series I'm going to redefine the signature of the previous URL helper class by declaring all of its methods static.

Their updates involve adding the "static" keyword to each of the function definitions so they can be called like: "URLHelper::get_request_method()".

0 comments voice your opinion now!
tutorial helper class handler


blog comments powered by Disqus

Similar Posts

Pim Elshoff's Blog: Setting up a kickass development environment on Windows

Padraic Brady's Blog: Example Zend Framework Blog Application Tutorial - Part 9 PDF Download

PHPMaster.com: In My Language, Please! - Translating WordPress Themes and Plugins

Mike Willbanks' Blog: Zend Framework Cache Backend Libmemcached + Session Cache

PradoSoft.com: PRADO/Wordpress/BBPress integration v1.0...


Community Events











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


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

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