@param \Spryker\Shared\Transfer\TransferInterface $transfer
@param string $containerName

@throws \Pav\Zed\Document\Business\Exception\NoDocumentFoundException
@return false|resource
323359
public function documentExists(TransferInterface $transfer, $containerName)
    {
        return $this->getFactory()
            ->createPdfDocumentManager()
            ->documentExists($transfer, $containerName);
    }
300881
private function ensureTransportExists(ContainerBuilder $container, string $busName, string $transport): void
    {
        $serviceId = 'gdbots_pbjx.transport.' . $transport;
        if ($container->hasDefinition($serviceId)) {
            return;
        }

        throw new \LogicException(
            sprintf(
                'The "gdbots_pbjx.%s_bus.transport" is configured to use "%s" which requires service "%s".',
                $busName,
                $transport,
                $serviceId
            )
        );
    }
357660
public function getTransport($transportName)
    {
        if (empty($this->transport[$transportName])) {
            throw new InvalidArgumentException(sprintf('Transport %s not found', $transportName));
        }

        return $this->transport[$transportName];
    }
240235
protected function prepareTransfer(TransferInterface $transferObject) {
        $uri    = $this->getUri();
        $body   = $transferObject->getBody();

        if( array_key_exists('chargeId', $body) ) {
            $uri = str_replace('{chargeId}', $body['chargeId'], $uri);

            unset($body['chargeId']);
        }

        $this->fullUri  = $transferObject->getUri() . $uri;
        $this->body     = $body;
    }
636853
public function streamBlob($container, $name, $params = [])
    {
        $this->checkConnection();
        try {
            /** @var Container $container */
            $container = $this->blobConn->getContainer($container);
            if (empty($container)) {
                throw new \Exception("No container named '$container'");
            }

            $obj = $container->DataObject($name);

            header('Last-Modified: ' . $obj->getLastModified());
            header('Content-Type: ' . $obj->getContentType());
            header('Content-Length:' . $obj->getContentLength());

            $disposition =
                (isset($params['disposition']) && !empty($params['disposition'])) ? $params['disposition']
                    : 'inline';

            header('Content-Disposition: ' . $disposition . '; filename="' . $name . '";');
            $index = 0;
            $size = (integer)$obj->getContentLength();
            $chunk = \Config::get('df.file_chunk_size');
            ob_clean();

            while ($index < $size) {
                $header = ['Range' => 'bytes=' . $index . '-' . ($index + $chunk - 1)];
                /** @var \Guzzle\Http\Message\RequestInterface $result */
                $request = $container->getService()->getClient()->get($obj->getUrl(), $header);
                /** @var \Guzzle\Http\Message\Response $result */
                $result = $request->send();
                $length = $result->getContentLength();
                $index += $length;
                flush();
                echo $result->getBody();
            }
        } catch (\Exception $ex) {
            static::handleGuzzleException($ex);
            if ($ex instanceof ObjFetchError) {
                $code = HttpStatusCodes::HTTP_NOT_FOUND;
                $status_header = "HTTP/1.1 $code";
                header($status_header);
                header('Content-Type: text/html');
                echo 'Failed to stream/download file. File ' . $name . ' was not found. ' . $ex->getMessage();
            } else {
                throw new DfException('Failed to stream blob: ' . $ex->getMessage());
            }
        }
    }
204822
public function deleteDocument(TransferInterface $transfer, $containerName)
    {
        $this->checkTransferMethods($transfer);

        $fileName = $transfer->getFileName();
        $relativePath = $transfer->getRelativePath();

        return $this->fileUploadFacade->deleteFile($containerName, $fileName, $relativePath);
    }
1234367
public function addTransferBase(\AgentSIB\Diadoc\Api\Proto\Invoicing\TransferBase $value)
    {
        if ($this->TransferBase === null) {
            $this->TransferBase = new \Protobuf\MessageCollection();
        }

        $this->TransferBase->add($value);
    }
787125
protected function renderFile(TransferInterface $transfer, $containerName, $fullFilePath)
    {
        $this->converterProxy->convertToFile($transfer, $containerName, $fullFilePath);
    }
296496
public function execute($returnTransfer = TRUE) {
        //Need transfer return
        if($returnTransfer === TRUE) {
            $this->setOption(CURLOPT_RETURNTRANSFER, 1);
        }

        $result = curl_exec($this->handler);

        //Error handling
        if(curl_errno($this->handler)) {
            $format = [curl_errno($this->handler), curl_error($this->handler)];
            $this->close();
            throw RuntimeException::createByFormat('Error executing request, error code: %s, Message: %s', $format);
        }

        return $result;
    }
441902
public static function projectRunName($project, $transferConfig, $run)
    {
        return self::getProjectRunNameTemplate()->render([
            'project' => $project,
            'transfer_config' => $transferConfig,
            'run' => $run,
        ]);
    }
458936
public function mapAddressCheck(QuoteTransfer $quoteTransfer): ContainerInterface
    {
        /** @var \SprykerEco\Zed\Payone\Business\Api\Request\Container\AddressCheckContainer $container */
        $container = $this->riskCheckFactory->createAddressCheckContainer();
        $container = $this->mapDefaultContainerParams($container);

        $container->setFirstName($quoteTransfer->getBillingAddress()->getFirstName());
        $container->setLastName($quoteTransfer->getBillingAddress()->getLastName());
        $container->setCompany($quoteTransfer->getBillingAddress()->getCompany());
        $container->setCountry($quoteTransfer->getBillingAddress()->getIso2Code());
        $container->setStreetName($quoteTransfer->getBillingAddress()->getAddress1());
        $container->setStreetNumber($quoteTransfer->getBillingAddress()->getAddress2());
        $container->setZip($quoteTransfer->getBillingAddress()->getZipCode());
        $container->setCity($quoteTransfer->getBillingAddress()->getCity());
        $container->setAddressCheckType($this->payoneConfig->getAddressCheckType());

        return $container;
    }
1092635
public function readFileStream($containerName, $fileName, $relativePath)
    {
        return $this->fileUploadFacade->readFileStream($containerName, $fileName, $relativePath);
    }
495709
public function readFileStream($containerName, $fileName, $relativePath)
    {
        return $this->getFactory()
            ->createStorage($containerName)
            ->readFileStream($containerName, $fileName, $relativePath);
    }
1027046
public function canCreate(ContainerInterface $container, $requestedName)
    {
        $config = $container->get('config');

        return isset($config[static::KEY_DATASOURCE][$requestedName]);
    }
109784
public function resolve(ContainerInterface $container, $id, $definition)
    {
        $definition = substr($definition, 1);
        if ($container->has($definition)) {
            return $container->get($definition);
        }

        return false;
    }
820590
public function outputPdf(TransferInterface $transfer, $containerName)
    {
        $pdfTransfer = $this->convertToPdfTransfer($transfer, $containerName);

        return $this->pdfBridge->outputPdfFile($pdfTransfer);
    }
1123191
public function canCreate(ContainerInterface $container, $requestedName)
    {
        $config = $container->get("config");
        return (
            isset($config[static::KEY][$requestedName][static::KEY_CLASS]) &&
            is_a($config[static::KEY][$requestedName][static::KEY_CLASS], static::KEY_DEFAULT_CLASS, true)
        );
    }