\App\IqrfNetModule\ModelsUploadManager

IQRF TR native upload manager

Summary

Methods
Properties
Constants
__construct()
upload()
uploadFile()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
recognizeFormat()
$path
$uploadManager
N/A

Properties

$path

$path : string

Type

normal — Path to the directory for uploaded files

$uploadManager

$uploadManager : \App\IqrfNetModule\Models\NativeUploadManager

Type

normal — IQRF TR native upload manager

Methods

__construct()

__construct(\App\ConfigModule\Models\GenericManager  $configManager, \App\IqrfNetModule\Models\NativeUploadManager  $uploadManager) : mixed

Constructor

Parameters

\App\ConfigModule\Models\GenericManager $configManager

Generic configuration manager

\App\IqrfNetModule\Models\NativeUploadManager $uploadManager

IQRF TR native upload manager

Returns

mixed

upload()

upload(\Nette\Http\FileUpload  $file, \App\IqrfNetModule\Enums\UploadFormats|null  $format = null) : void

Uploads the file into IQRF TR module

Parameters

\Nette\Http\FileUpload $file

File to upload

\App\IqrfNetModule\Enums\UploadFormats|null $format

File format

Throws

\App\GatewayModule\Exceptions\CorruptedFileException
\App\IqrfNetModule\Exceptions\DpaErrorException
\App\IqrfNetModule\Exceptions\EmptyResponseException
\Nette\Utils\JsonException
\App\IqrfNetModule\Exceptions\UserErrorException

uploadFile()

uploadFile(string  $file, \App\IqrfNetModule\Enums\UploadFormats|null  $format = null) : void

Uploads the file into IQRF TR module

Parameters

string $file

File path

\App\IqrfNetModule\Enums\UploadFormats|null $format

File format

Throws

\App\IqrfNetModule\Exceptions\DpaErrorException
\App\IqrfNetModule\Exceptions\EmptyResponseException
\Nette\Utils\JsonException
\App\IqrfNetModule\Exceptions\UserErrorException

recognizeFormat()

recognizeFormat(string  $file) : \App\IqrfNetModule\Enums\UploadFormats

Recognizes a file format

Parameters

string $file

File name

Throws

\App\GatewayModule\Exceptions\UnknownFileFormatExceptions

Returns

\App\IqrfNetModule\Enums\UploadFormats —

File format