News Feed
Sections




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

DevShed:
Working Out of the Object Context to Build Loader Apps in PHP
June 26, 2009 @ 07:56:54

New on DevShed there's the latest part of a series of tutorials they've written up (fifth of eight) about building automatic loading functionality into your applications. This time they change up their class to make the their loading function accessible outside of a class object.

To avoid an eventual (and unnecessary) instantiation of the loader class, it would be helpful to declare the mentioned "load()" method static. Thus, bearing in mind this important concept, in this fifth part of the series I'm going to enhance the signature of the "Loader" class created previously by turning its loading method into a static one.

They change the definition of the function to be "public static" making it callable both through the "self" keyword and outside the class with the "::" operator.

0 comments voice your opinion now!
static tutorial application loader


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: 10 Productive PHP Tools for Testing and Debugging

Till Klampaeckel's Blog: Iterating over a table (with Zend_Db_Table and Zend_Paginator)

CodeForest.net: Key/value tables and how to use them in PHP and MySQL

Lorna Mitchell's Blog: Fetching Namespaced XML Elements With SimpleXML

Matthew Weir O'Phinney's Blog: Start Writing Embeddable Applications


Community Events





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


code podcast list conference deployment voicesoftheelephpant language bugfix symfony tips framework laravel introduction threedevsandamaybe interview zendserver release series community api

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