Returns the upload folder path

@param  ContainerInterface $container
@return string
320006
public static function getUploadFolder(ContainerInterface $container)
    {
        $request = $container->get('request');

        $baseUrl = dirname($request->getBaseUrl());
        $baseUrl = substr($baseUrl, 1);
        if ( ! empty($baseUrl)) {
            $baseUrl .= '/';
        }

        return $baseUrl . $container->getParameter('red_kite_cms.upload_assets_dir');
    }
954125
public function getFolderProperties($container, $path)
    {
        $path = FileUtilities::fixFolderPath($path);
        $out = ['name' => basename($path), 'path' => $path];
        $dirPath = static::addContainerToName($container, $path);
        $temp = stat($dirPath);
        $out['last_modified'] = gmdate(static::TIMESTAMP_FORMAT, array_get($temp, 'mtime', 0));

        return $out;
    }
366080
public static function findPath(\Psr\Http\Message\ServerRequestInterface $request)
    {
        $server = $request->getServerParams();
        $path = $request->getUri()->getPath();
        if (isset($server['SCRIPT_NAME'])) {
            $basePath = dirname($server['SCRIPT_NAME']);
            if ($basePath != '/') {
                $length = strlen($basePath);
                if (substr($path, 0, $length) == $basePath) {
                    $path = substr($path, $length);
                }
            }
        }
        if ($path == '/' or $path == '') {
            return [];
        }
        if ($path[0] == '/') {
            $path = substr($path, 1);
        }
        return array_map('urldecode', explode('/', $path));
    }
1251757
public function getSourcePath(PackageInterface $package)
    {
        return !$package instanceof \Composer\Package\RootPackage
            ? $this->installationManager->getInstallPath($package)
            : realpath(dirname(\Composer\Factory::getComposerFile()));
    }
1167276
public function getLoaderFilePackagePath(PackageInterface $package)
    {
        $installPath = $this->getInstallPath($package);

        if ($installPath === false) {
            return false;
        }

        $config      = $this->getInstallerConfig($package);
        $packagePath = $installPath . $config['loader'];

        return $packagePath;
    }
521310
protected static function getLoggerIfEnabled(ContainerInterface $container): ?LoggerInterface
    {
        $logger = null;
        if ($container->has(LoggerInterface::class) === true &&
            $container->get(SettingsProviderInterface::class)->get(S::class)[S::KEY_IS_LOG_ENABLED] === true
        ) {
            $logger = $container->get(LoggerInterface::class);
        }

        return $logger;
    }
249944
protected function mapDefaultContainerParams(ContainerInterface $container): ContainerInterface
    {
        /** @var \SprykerEco\Zed\Payone\Business\Api\Request\Container\AbstractRequestContainer $container */
        $container->setMid($this->standardParameters->getMid());
        $container->setAid($this->standardParameters->getAid());
        $container->setPortalid($this->standardParameters->getPortalId());
        $container->setKey(md5($this->standardParameters->getKey()));
        $container->setMode($this->modeDetector->getMode());
        $container->setIntegratorName(PayoneApiConstants::INTEGRATOR_NAME_SPRYKER);
        $container->setIntegratorVersion(PayoneApiConstants::INTEGRATOR_VERSION_3_0_0);
        $container->setSolutionName(PayoneApiConstants::SOLUTION_NAME_SPRYKER);
        $container->setSolutionVersion(PayoneApiConstants::SOLUTION_VERSION_3_0_0);

        return $container;
    }
753837
private function getAppDir(ContainerBuilder $container): string
    {
        if ($container->hasParameter('kernel.project_dir')) {
            return (string) $container->getParameter('kernel.project_dir') . '/' . (string) $container->getParameter('kernel.name');
        }

        return (string) $container->getParameter('kernel.root_dir');
    }
585753
public function getDirectory(): FilePathInterface
    {
        return new self($this->myIsAbsolute, $this->myAboveBaseLevel, $this->myDrive, $this->myDirectoryParts, null);
    }
1225509
protected function getApplicationConfiguration(ContainerInterface $container): array
    {
        /** @var CacheSettingsProviderInterface $settingsProvider */
        $settingsProvider = $container->get(CacheSettingsProviderInterface::class);
        $appConfig        = $settingsProvider->getApplicationConfiguration();

        return $appConfig;
    }
457369
public function pathResolvable(Container $container)
    {
        $news = $this->loadNewsFromPath($container);
        return ($news instanceof NewsInterface) && $news->id();
    }
678478
protected function getPathForPartialUpload(string $key) : string
    {
        list($actualKey, /* $partialUploadKey */) = explode(self::PARTIAL_UPLOAD_NAME_SEPARATOR, $key);

        $path = $this->uploadDir . DIRECTORY_SEPARATOR . $actualKey . DIRECTORY_SEPARATOR;

        if ( ! file_exists($path)) {
            mkdir($path);
        }

        return $path;
    }
1154437
public function pathResolvable(Container $container)
    {
        $event = $this->loadEventFromPath($container);
        return ($event instanceof EventInterface) && $event->id();
    }
502364
protected function getRootProviderName(ContainerInterface $container)
    {
        $rootProvider = $container->getBasicDefinition()->getRootDataProvider();

        if (!$rootProvider) {
            throw new DcGeneralRuntimeException(
                'Root data provider name not specified in DCA but rootEntries section specified.'
            );
        }

        if (!$container->getDataProviderDefinition()->hasInformation($rootProvider)) {
            throw new DcGeneralRuntimeException('Unknown root data provider but rootEntries section specified.');
        }

        return $rootProvider;
    }
420149
public function getInstallPath(PackageInterface $package)
    {
        $prettyName = $package->getPrettyName();
        DebugPrinter::log(
            'Getting install path for `%s` package',
            array($prettyName,)
        );
        if (isset($this->installDirCache[$prettyName])) {
            return $this->installDirCache[$prettyName];
        }
        $installDir = null;
        if ($this->composer->getPackage()) {
            $rootExtra = $this->composer->getPackage()->getExtra();
            if (!empty($rootExtra['opencart-install-dir'])) {
                $installDir = $rootExtra['opencart-install-dir'];
            }
        }
        if (!$installDir) {
            $extra = $package->getExtra();
            if (!empty($extra['opencart-install-dir'])) {
                $installDir = $extra['opencart-install-dir'];
            }
        }
        if (is_array($installDir)) {
            if (isset($installDir[$prettyName])) {
                $this->installDirCache[$prettyName] = $installDir[$prettyName];
                return $installDir[$prettyName];
            }
            $this->installDirCache[$prettyName] = $this->defaultInstallDir;
            return $this->defaultInstallDir;
        }
        $installDir = $installDir ? $installDir : $this->defaultInstallDir;
        DebugPrinter::log(
            'Computed install dir for package `%s`: `%s`',
            array($prettyName, $installDir,)
        );
        $this->installDirCache[$prettyName] = $installDir;
        return $installDir;
    }
314314
public function withContainer(ContainerInterface $container): ContainerizedInterface
    {
        $route = clone $this;
        $route->container = $container;
        if ($route->target instanceof TargetInterface) {
            $route->target = clone $route->target;
        }

        $route->pipeline = $route->makePipeline();

        return $route;
    }
706377
public function generateDownloadUrl(FileInterface $file)
    {
        return $this->container->get('router')->generate('thrace_media_file_download', array(
            'filepath' => $file->getFilePath(), 'filename' => $file->getOriginalName()
        ), true);
    }