/** * @param string $site */ private static function _createContext($site) { $ctx = new MShop_Context_Item_Default(); $arcavias = self::getArcavias(); $paths = $arcavias->getConfigPaths('mysql'); $paths[] = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config'; $file = __DIR__ . DIRECTORY_SEPARATOR . 'confdoc.ser'; $conf = new MW_Config_Array(array(), $paths); $conf = new MW_Config_Decorator_Memory($conf); $conf = new MW_Config_Decorator_Documentor($conf, $file); $ctx->setConfig($conf); $dbm = new MW_DB_Manager_PDO($conf); $ctx->setDatabaseManager($dbm); $logger = new MW_Logger_File($site . '.log', MW_Logger_Abstract::DEBUG); $ctx->setLogger($logger); $session = new MW_Session_None(); $ctx->setSession($session); $i18n = new MW_Translation_None('de'); $ctx->setI18n(array('de' => $i18n)); $localeManager = MShop_Locale_Manager_Factory::createManager($ctx); $locale = $localeManager->bootstrap($site, 'de', '', false); $ctx->setLocale($locale); $view = self::_createView($conf); $ctx->setView($view); $ctx->setEditor('core:controller/jobs'); return $ctx; }
/** * @param string $site */ private static function _createContext($site) { $ctx = new MShop_Context_Item_Default(); $aimeos = self::_getAimeos(); $paths = $aimeos->getConfigPaths('mysql'); $paths[] = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config'; $conf = new MW_Config_Array(array(), $paths); $ctx->setConfig($conf); $dbm = new MW_DB_Manager_PDO($conf); $ctx->setDatabaseManager($dbm); $logger = new MW_Logger_File($site . '.log', MW_Logger_Abstract::DEBUG); $ctx->setLogger($logger); $i18n = new MW_Translation_None('de'); $ctx->setI18n(array('de' => $i18n)); $session = new MW_Session_None(); $ctx->setSession($session); $localeManager = MShop_Locale_Manager_Factory::createManager($ctx); $localeItem = $localeManager->bootstrap($site, '', '', false); $ctx->setLocale($localeItem); $ctx->setEditor('ai-swiftmailer:lib/custom'); return $ctx; }
private static function _createContext($site) { $ctx = new MShop_Context_Item_Default(); $arcavias = self::_getArcavias(); $paths = $arcavias->getConfigPaths('mysql'); $paths[] = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config'; $conf = new MW_Config_Array(array(), $paths); $ctx->setConfig($conf); $dbm = new MW_DB_Manager_PDO($conf); $ctx->setDatabaseManager($dbm); $logger = new MW_Logger_File($site . '.log', MW_Logger_Abstract::DEBUG); $ctx->setLogger($logger); $cache = new MW_Cache_None(); $ctx->setCache($cache); $i18n = new MW_Translation_None('en'); $ctx->setI18n(array('en' => $i18n)); $session = new MW_Session_None(); $ctx->setSession($session); $localeManager = MShop_Locale_Manager_Factory::createManager($ctx); $locale = $localeManager->bootstrap($site, '', '', false); $ctx->setLocale($locale); $ctx->setEditor('<extname>:client/html'); return $ctx; }