Those who are familiar with the XP-Framework may be interested to hear that it is possible to load and use the classes of XP natively within Stubbles. Read on for an example how to do that.
The following little example uses a so called foreign class loader that is responsible for a given namespace, in this case net.xp_framework. This class loader is registered within the default Stubbles class loader. After that, all classes that reside in the namespace where the foreign class loader is responsible for will be loaded via this class loader. Here we load the class text.String (from xp-rt-5.3.1.xar) and use it.
require stubConfig::getLibPath() . DIRECTORY_SEPARATOR . 'stubbles.php';
$string = new String('foo');
The only requirement to bring this to work is to download the current version of XP, and to put the lang.base.php and the xp-rt-[VERSION].xar into the lib-directory of Stubbles.