LouisLandry/packager — pull request #1 by garyamort (2012-11-20 01:28:43+00:00)
Title: Namespace hacking around

Adds attribute for xml directory imports: "namespace". If set, this will prepend a namespace to the files in the directory.

Namespace folder contains some demo code to implement it. It presumes a directory structure of:
\build
\src\lib --> link to joomla platform libraries
\src\libraries --> link to joomla platform libraries
\src\namespace: demo code
loader.php: munged JLoader class, simple string replacement of 'JLoader' with __CLASS__ since autoloadregister uses the string, not the namespaced class, to register the callback. __CLASS__ will have the correct namespace when it is set or when it is not set.packager.xml : defines the names joomla\joomla\p12_4 just as a demo
import.stub.php - makes a few changes on bare function callbacks to add the namespace to the string - otherwise bad things happen. Also adds a second prefix match to catch the namespaced classes...honestly this should be a namespace match but hey - it works!

sample_p12.4.php : at the moment just creates a couple of JObjects and dumps them to confirm the correct class was used.