Returns all data that we need to create a xliff-File.

@return array

@throws DocumentManagerException
423187
public function getExportData()
    {
        $snippets = $this->getSnippets();
        $snippetsData = [];

        $progress = new ProgressBar($this->output, count($snippets));
        $progress->start();

        /*
         * @var SnippetDocument
         */
        foreach ($snippets as $snippet) {
            $contentData = $this->getContentData($snippet, $this->exportLocale);

            $snippetsData[] = [
                'uuid' => $snippet->getUuid(),
                'locale' => $snippet->getLocale(),
                'content' => $contentData,
            ];

            $progress->advance();
        }

        $progress->finish();

        return [
            'locale' => $this->exportLocale,
            'format' => $this->format,
            'snippetData' => $snippetsData,
        ];
    }
63338
public function export()
	{
		$result = [];
		foreach ($this->getListBuilder()->getResult() as $item) {
			foreach ($item->getFields() as $field) {
				$value = $field->getValue();

				if (!is_string($value)) {
					$value = $value->toArray();
				}

				$result[$item->getIdentifier()][$field->getName()] = $value;
			}
		}

		$xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><response/>');
		$this->arrayToXml($result, $xml);

		return $this->createResponse($xml->asXML());
	}
1253988
public function getAllDocuments(): array
    {
        $documents = [];

        foreach ($this->filesystem->listContents('/'.$this->path) as $info) {
            $id = $info['filename'];

            if ($this->hasDocument($id)) {
                $documents[$id] = $this->getDocument($id);
            }
        }

        return $documents;
    }
1188230
public function getFiles()
    {
        if(!$this->isPropertyAvailable('Files')){
            $this->setProperty("Files", new FileCollection($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath(), "Files")));
        }
        return $this->getProperty("Files");
    }
1274
protected function getListFile()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->file->getList(array('limit' => $this->getLimit()));
        }

        if ($this->getParam('type')) {
            return $this->file->getList(array('file_type' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('mime')) {
            return $this->file->getList(array('mime_type' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('entity')) {
            return $this->file->getList(array('entity' => $id, 'limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        $result = $this->file->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
952484
public function toArray()
    {
        $document = [];

        if (! empty($this->links)) {
            $document['links'] = $this->links;
        }

        if (! empty($this->data)) {
            $document['data'] = $this->data->toArray();

            $resources = $this->getIncluded($this->data);

            if (count($resources)) {
                $document['included'] = array_map(function (Resource $resource) {
                    return $resource->toArray();
                }, $resources);
            }
        }

        if (! empty($this->meta)) {
            $document['meta'] = $this->meta;
        }

        if (! empty($this->errors)) {
            $document['errors'] = $this->errors;
        }

        if (! empty($this->jsonapi)) {
            $document['jsonapi'] = $this->jsonapi;
        }

        return $document;
    }
404113
public function getData()
    {
        $data = $this->context->data;
        $result = [
            'version' => 3,
            'file' => $data['file'] ?: '',
            'sourceRoot' => $data['sourceRoot'] ?: '',
            'sources' => $this->sources->getNames(),
            'names' => $this->names->getNames(),
            'mappings' => $this->context->getMappings()->pack(),
        ];
        $contents = $this->sources->getContents();
        if (!empty($contents)) {
            $result['sourcesContent'] = $contents;
        }
        return $result;
    }
309341
public function findAll() {
    $sheets = array();
    
    foreach ($this->readSelectedSheets() as $selectName => $excelSheet) {
      $sheets[$selectName] = new Sheet($selectName, $this->readRows($excelSheet));
    }
    
    return $sheets;
  }
578426
public function getData()
    {
        $this->validate(
            'username',
            'password',
            'transactionId',
            'currency'
        );

        $document = new \DOMDocument('1.0', 'utf-8');
        $document->formatOutput = false;
        $document->createElement('soapenv:Header');

        $envelope = $document->appendChild(
            $document->createElementNS('http://schemas.xmlsoap.org/soap/envelope/', 'soapenv:Envelope')
        );
        $envelope->setAttribute('xmlns:urn', 'urn:pscservice');

        $body = $envelope->appendChild(
            $document->createElement('soapenv:Body')
        );

        $serialNumbers = $body->appendChild(
            $document->createElement('urn:getSerialNumbers')
        );

        $serialNumbers->appendChild(
            $document->createElement('urn:username', $this->getUsername())
        );

        $serialNumbers->appendChild(
            $document->createElement('urn:password', $this->getPassword())
        );

        $serialNumbers->appendChild(
            $document->createElement('urn:mtid', $this->getTransactionId())
        );

        $serialNumbers->appendChild(
            $document->createElement('urn:subId', $this->getSubId())
        );

        $serialNumbers->appendChild(
            $document->createElement('urn:currency', $this->getCurrency())
        );

        return $document->saveXML();
    }
332128
public function getData()
    {
        if ($transactionId = $this->httpRequest->query->get('mtid')) {
            $this->setTransactionId($transactionId);
        }

        if ($currency = $this->httpRequest->query->get('currency')) {
            $this->setCurrency($currency);
        }

        if ($amount = $this->httpRequest->query->get('amount')) {
            $this->setAmount($amount);
        }

        if ($subId = $this->httpRequest->query->get('subid')) {
            $this->setSubId($subId);
        }

        $this->validate(
            'username',
            'password',
            'transactionId',
            'currency',
            'amount'
        );

        $document = new \DOMDocument('1.0', 'utf-8');
        $document->formatOutput = false;
        $document->createElement('soapenv:Header');

        $envelope = $document->appendChild(
            $document->createElementNS('http://schemas.xmlsoap.org/soap/envelope/', 'soapenv:Envelope')
        );
        $envelope->setAttribute('xmlns:urn', 'urn:pscservice');

        $body = $envelope->appendChild(
            $document->createElement('soapenv:Body')
        );

        $debit = $body->appendChild(
            $document->createElement('urn:executeDebit')
        );

        $debit->appendChild(
            $document->createElement('urn:username', $this->getUsername())
        );

        $debit->appendChild(
            $document->createElement('urn:password', $this->getPassword())
        );

        $debit->appendChild(
            $document->createElement('urn:mtid', $this->getTransactionId())
        );

        $debit->appendChild(
            $document->createElement('urn:subId', $this->getSubId())
        );

        $debit->appendChild(
            $document->createElement('urn:amount', $this->getAmount())
        );

        $debit->appendChild(
            $document->createElement('urn:currency', $this->getCurrency())
        );

        $debit->appendChild(
            $document->createElement('urn:close', '1')
        );

        return $document->saveXML();
    }
1374065
public function getAssetFileList()
    {
        $propertyList = $this->_getEntityList('Files');
        $result = [];

        foreach ($propertyList as $properties) {
            $result[] = AssetFile::createFromOptions($properties);
        }

        return $result;
    }
324648
public function findAll()
    {
        $ext       = $this->formatter->getFileExtension();
        $files     = $this->getAllFiles();
        $documents = array();

        foreach ($files as $file) {
            $fp       = fopen($file, 'r');
            $contents = fread($fp, filesize($file));
            fclose($fp);

            $data = $this->formatter->decode($contents);

            if (null !== $data) {
                $doc = new $this->documentClass((array) $data);
                $doc->setId($this->getIdFromPath($file, $ext));

                $documents[] = $doc;
            }
        }

        return $documents;
    }
961254
public function getDocumentExportManager()
    {
        if (null === $this->documentExportManager) {
            $this->documentExportManager = new DocumentExportManager($this->httpClient, $this->messageFactory, $this->serializer);
            $this->documentExportManager->setHost($this->host);
        }
        return $this->documentExportManager;
    }
1214744
public function export()
	{
		$result = [];
		foreach ($this->getListBuilder()->getResult() as $item) {
			foreach ($item->getFields() as $field) {
				$value = $field->getValue();

				if (!is_string($value)) {
					$value = $value->toArray();
				}

				$result[$item->getIdentifier()][$field->getName()] = $value;
			}
		}

		\Excel::create($this->getFilename(), function($excel) use ($result) {
			$excel->setTitle('Export');
			$excel->setCreator('Bauhaus')
				->setCompany('KraftHaus');

			$excel->sheet('Excel sheet', function($sheet) use ($result) {
				$sheet->setOrientation('landscape');
				$sheet->fromArray($result);
			});

		})->download('xls');
	}
970014
public function getMigrationsFiles()
    {
        $files = [];
        foreach ($this->orm->getComponents(true) as $component) {
            if ($component instanceof AppInterface) {
                $fileHandler = FileHandler::createObject(
                    [
                        'path' => $component->getMigrationsPath(),
                    ]
                );

                $files[$component->getName()] = $fileHandler->getPathFiles();
            }
        }

        return $files;
    }
957658
protected function getAnyData()
	{
		$filepoll = new AnydatasetFilenameProcessor("poll_list");
		$this->_anyPoll = new AnyDataset($filepoll->FullQualifiedNameAndPath());
		$fileanswer = new AnydatasetFilenameProcessor("poll_" . $this->_poll . "_" . $this->_lang);
		$this->_anyAnswer = new AnyDataset($fileanswer->FullQualifiedNameAndPath());
	}
942153
final public function export(): array
    {
        $finalArray = [];
        $mandatoryFields = $this->getMandatoryFields();

        $cleanObject = new $this();
        foreach ($cleanObject as $fieldId => $value) {
            if ($this->$fieldId === $cleanObject->$fieldId) {
                if (\in_array($fieldId, $mandatoryFields, true)) {
                    $missingMandatoryField = new MissingMandatoryField(sprintf(
                        'The field "%s" for class "%s" is mandatory and empty, please correct',
                        $fieldId,
                        \get_class($cleanObject)
                    ));
                    $missingMandatoryField->method = \get_class($cleanObject);
                    $missingMandatoryField->methodInstance = $this;
                    throw $missingMandatoryField;
                }
            } else {
                $finalArray[$fieldId] = $this->$fieldId;
            }
        }

        return $finalArray;
    }