News Feed
Jobs Feed
Sections




News Archive
Evert Pot's Blog:
Taking advantage of PHP namespaces with older code
February 01, 2011 @ 10:10:35

Evert Pot has a quick post about a suggestion mentioned at PHPBenelux related to using namespaces with older code.

If you're running PHP 5.3 and you have to use pesky old code that uses long class prefixes (yea, so, pretty much all PHP code out there), you can still make use of namespace features to shorten them.

He includes a quick example that shows the shift from using the traditional Zend_Controller_Action_Helper_AutoComplete_Abstract to an aliasing with the use/as to just reference it as AutoComplete.

0 comments voice your opinion now!
namespace old code zendframework use keyword


blog comments powered by Disqus

Similar Posts

Project: RIPS - Static Source Code Analyzer for Vulnerabilities in PHP Scripts

Daniel Cousineau's Blog: Zend Framework Module Init Script (Controller Plugin)

Rob Allen's Blog: Local config files and Zend_Application

PHP.net: PHP 5.3 alpha 1 Released

ProDevTips.com: Writing a CMS/Community with Smarty and the Zend Framework: Part 5


Community Events











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


example community zendframework2 code interview functional podcast conference introduction framework development unittest language opinion object tool release testing series phpunit

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