public function addExtension($xmlns, $namespace)
{
$this->exturi[$namespace] = $xmlns;
// Include the extension data, request and response files
$pos = strrpos($namespace, '/');
if ($pos !== false) {
$path = substr($namespace, $pos + 1, 999);
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$includepath = dirname(__FILE__) . '\\eppExtensions\\' . $path . '\\includes.php';
} else {
$includepath = dirname(__FILE__) . '/eppExtensions/' . $path . '/includes.php';
}
} else {
$pos = strrpos($namespace, ':');
if ($pos !== false) {
$path = substr($namespace, $pos + 1, 999);
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$includepath = dirname(__FILE__) . '\\eppExtensions\\' . $path . '\\includes.php';
} else {
$includepath = dirname(__FILE__) . '/eppExtensions/' . $path . '/includes.php';
}
} else {
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$includepath = dirname(__FILE__) . '\\eppExtensions\\' . $namespace . '\\includes.php';
} else {
$includepath = dirname(__FILE__) . '/eppExtensions/' . $namespace . '/includes.php';
}
}
}
if (is_file($includepath)) {
include_once $includepath;
}
}