Ejemplo n.º 1
0
 /**
  * @param string $site
  */
 private static function createContext($site)
 {
     $ctx = new \Aimeos\MShop\Context\Item\Standard();
     $aimeos = self::getAimeos();
     $paths = $aimeos->getConfigPaths('mysql');
     $paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config';
     $file = __DIR__ . DIRECTORY_SEPARATOR . 'confdoc.ser';
     $conf = new \Aimeos\MW\Config\PHPArray(array(), $paths);
     $conf = new \Aimeos\MW\Config\Decorator\Memory($conf);
     $conf = new \Aimeos\MW\Config\Decorator\Documentor($conf, $file);
     $ctx->setConfig($conf);
     $dbm = new \Aimeos\MW\DB\Manager\PDO($conf);
     $ctx->setDatabaseManager($dbm);
     $logger = new \Aimeos\MW\Logger\File($site . '.log', \Aimeos\MW\Logger\Base::DEBUG);
     $ctx->setLogger($logger);
     $cache = new \Aimeos\MW\Cache\None();
     $ctx->setCache($cache);
     $i18n = new \Aimeos\MW\Translation\None('de');
     $ctx->setI18n(array('de' => $i18n));
     $session = new \Aimeos\MW\Session\None();
     $ctx->setSession($session);
     $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($ctx);
     $locale = $localeManager->bootstrap($site, '', '', false);
     $ctx->setLocale($locale);
     $ctx->setEditor('core:admin/jqadm');
     return $ctx;
 }
Ejemplo n.º 2
0
 /**
  * @param string $site
  */
 private static function createContext($site)
 {
     $ctx = new \Aimeos\MShop\Context\Item\Standard();
     $aimeos = self::getAimeos();
     $paths = $aimeos->getConfigPaths('mysql');
     $paths[] = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config';
     $conf = new \Aimeos\MW\Config\PHPArray(array(), $paths);
     $ctx->setConfig($conf);
     $dbm = new \Aimeos\MW\DB\Manager\PDO($conf);
     $ctx->setDatabaseManager($dbm);
     $logger = new \Aimeos\MW\Logger\File($site . '.log', \Aimeos\MW\Logger\Base::DEBUG);
     $ctx->setLogger($logger);
     $i18n = new \Aimeos\MW\Translation\None('de');
     $ctx->setI18n(array('de' => $i18n));
     $session = new \Aimeos\MW\Session\None();
     $ctx->setSession($session);
     $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($ctx);
     $localeItem = $localeManager->bootstrap($site, '', '', false);
     $ctx->setLocale($localeItem);
     $ctx->setEditor('ai-monolog:lib/custom');
     return $ctx;
 }
Ejemplo n.º 3
0
 /**
  * @param string $site
  */
 private static function createContext($site)
 {
     $ctx = new \Aimeos\MShop\Context\Item\Standard();
     $aimeos = self::getAimeos();
     $paths = $aimeos->getConfigPaths();
     $paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config';
     $conf = new \Aimeos\MW\Config\PHPArray(array(), $paths);
     $ctx->setConfig($conf);
     $dbm = new \Aimeos\MW\DB\Manager\PDO($conf);
     $ctx->setDatabaseManager($dbm);
     $fs = new \Aimeos\MW\Filesystem\Manager\Standard($conf);
     $ctx->setFilesystemManager($fs);
     $logger = new \Aimeos\MW\Logger\File($site . '.log', \Aimeos\MW\Logger\Base::DEBUG);
     $ctx->setLogger($logger);
     $session = new \Aimeos\MW\Session\None();
     $ctx->setSession($session);
     $i18n = new \Aimeos\MW\Translation\None('de');
     $ctx->setI18n(array('de' => $i18n));
     $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($ctx);
     $locale = $localeManager->bootstrap($site, '', '', false);
     $ctx->setLocale($locale);
     $ctx->setEditor('phpexcel:controller/extjs');
     return $ctx;
 }
Ejemplo n.º 4
0
 /**
  * @param string $site
  */
 private static function createContext($site)
 {
     $ctx = new \Aimeos\MShop\Context\Item\Standard();
     $aimeos = self::getAimeos();
     $paths = $aimeos->getConfigPaths('mysql');
     $paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config';
     $file = __DIR__ . DIRECTORY_SEPARATOR . 'confdoc.ser';
     $local = array('resource' => array('fs' => array('adapter' => 'Standard', 'basedir' => __DIR__ . '/tmp')));
     $conf = new \Aimeos\MW\Config\PHPArray($local, $paths);
     $conf = new \Aimeos\MW\Config\Decorator\Memory($conf);
     $conf = new \Aimeos\MW\Config\Decorator\Documentor($conf, $file);
     $ctx->setConfig($conf);
     $logger = new \Aimeos\MW\Logger\File($site . '.log', \Aimeos\MW\Logger\Base::DEBUG);
     $ctx->setLogger($logger);
     $dbm = new \Aimeos\MW\DB\Manager\PDO($conf);
     $ctx->setDatabaseManager($dbm);
     $fs = new \Aimeos\MW\Filesystem\Manager\Standard($conf);
     $ctx->setFilesystemManager($fs);
     $mq = new \Aimeos\MW\MQueue\Manager\Standard($conf);
     $ctx->setMessageQueueManager($mq);
     $cache = new \Aimeos\MW\Cache\None();
     $ctx->setCache($cache);
     $i18n = new \Aimeos\MW\Translation\None('de');
     $ctx->setI18n(array('de' => $i18n));
     $session = new \Aimeos\MW\Session\None();
     $ctx->setSession($session);
     $localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($ctx);
     $locale = $localeManager->bootstrap($site, '', '', false);
     $ctx->setLocale($locale);
     $ctx->setEditor('core:client/html');
     return $ctx;
 }