From: "Matt Palermo" on 3 Oct 2010 12:09
ï»¿Is it possible to create a global namespace alias in PHP or does the alias have to be defined in EVERY file that I use? Here is an example:
use \this\is\my\custom\namespace\Item as nsItem;
// Attempt to use namespace alias defined in main.php file
The above code doesnât work for me. The namespace alias defined in the main.php file isnât accessible in the index.php file. Is there a way to make the ânsItemâ alias a âglobalâ one, so that I donât have to define it in EVERY file that I want to use?