示例#1
0
$soapINI->loadCache();
/*!
 Reads settings from i18n.ini and passes them to eZTextCodec.
*/
function eZUpdateTextCodecSettings()
{
    $ini = eZINI::instance('i18n.ini');
    list($i18nSettings['internal-charset'], $i18nSettings['http-charset'], $i18nSettings['mbstring-extension']) = $ini->variableMulti('CharacterSettings', array('Charset', 'HTTPCharset', 'MBStringExtension'), array(false, false, 'enabled'));
    eZTextCodec::updateSettings($i18nSettings);
}
// Initialize text codec settings
eZUpdateTextCodecSettings();
// Initialize module loading
$moduleRepositories = eZModule::activeModuleRepositories();
eZModule::setGlobalPathList($moduleRepositories);
// Load soap extensions
$enableSOAP = $soapINI->variable('GeneralSettings', 'EnableSOAP');
if ($enableSOAP == 'true') {
    eZSys::init('soap.php');
    // Login if we have username and password.
    if (eZHTTPTool::username() and eZHTTPTool::password()) {
        eZUser::loginUser(eZHTTPTool::username(), eZHTTPTool::password());
    }
    $server = new eZSOAPServer();
    foreach ($soapINI->variable('ExtensionSettings', 'SOAPExtensions') as $extension) {
        include_once eZExtension::baseDirectory() . '/' . $extension . '/soap/initialize.php';
    }
    $server->processRequest();
}
ob_end_flush();
eZExecution::cleanExit();