Esempio n. 1
0
 /**
  * @return \Spryker\Shared\Application\Communication\Application
  */
 public function boot()
 {
     $this->application['debug'] = Config::get(ApplicationConstants::ENABLE_APPLICATION_DEBUG, false);
     $this->application['locale'] = Store::getInstance()->getCurrentLocale();
     if (Config::get(ApplicationConstants::ENABLE_WEB_PROFILER, false)) {
         $this->application['profiler.cache_dir'] = DataDirectory::getLocalStoreSpecificPath('cache/profiler');
     }
     $this->optimizeApp();
     $this->enableHttpMethodParameterOverride();
     if ($this->isInternalRequest() && !$this->isAuthenticationEnabled()) {
         $this->registerServiceProviderForInternalRequest();
         return $this->application;
     }
     if ($this->isInternalRequest()) {
         $this->registerServiceProviderForInternalRequestWithAuthentication();
         return $this->application;
     }
     $this->registerServiceProvider();
     $this->addVariablesToTwig();
     return $this->application;
 }
Esempio n. 2
0
 /**
  * @param string $fileName
  * @param string $dir
  *
  * @throws \Exception
  *
  * @return string
  */
 public static function getFilePath($fileName, $dir = 'logs')
 {
     $logPath = DataDirectory::getLocalStoreSpecificPath($dir);
     if ($dir === 'logs') {
         $logPath .= APPLICATION . DIRECTORY_SEPARATOR;
         if (is_dir($logPath) === false) {
             mkdir($logPath, 0775, true);
         }
     }
     if (!is_writable($logPath)) {
         throw new Exception(sprintf('Log file "%s" is not writable!', $logPath));
     }
     return $logPath . DIRECTORY_SEPARATOR . $fileName;
 }
Esempio n. 3
0
 /**
  * @return string
  */
 public function getDestinationDirectoryForUploads()
 {
     return DataDirectory::getLocalStoreSpecificPath('import/products');
 }
Esempio n. 4
0
 /**
  * @return string
  */
 protected function getCacheFilename()
 {
     return DataDirectory::getLocalStoreSpecificPath('cache/autoloader') . '/unresolvable.php';
 }
<?php

use Spryker\Shared\Application\ApplicationConstants;
$config[ApplicationConstants::PROJECT_NAMESPACES] = ['Pyz'];
$config[ApplicationConstants::CORE_NAMESPACES] = ['Spryker'];
$config[ApplicationConstants::PROJECT_TIMEZONE] = 'UTC';
$config[ApplicationConstants::PROJECT_NAMESPACE] = 'Pyz';
$config[ApplicationConstants::ERROR_LEVEL] = E_ALL;
/* Customer */
$config[ApplicationConstants::APPLICATION_SPRYKER_ROOT] = APPLICATION_ROOT_DIR . '/../';
$config[ApplicationConstants::ZED_TWIG_OPTIONS] = ['cache' => \Spryker\Shared\Library\DataDirectory::getLocalStoreSpecificPath('cache/Zed/twig')];
// Why this?
$config[ApplicationConstants::YVES_SSL_ENABLED] = false;
$config[ApplicationConstants::NAVIGATION_CACHE_ENABLED] = false;
$config[ApplicationConstants::NAVIGATION_ENABLED] = false;