\App\IqrfNetModule\ModelsNativeUploadManager

Upload manager

Summary

Methods
Properties
Constants
__construct()
upload()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$apiRequest
$wsClient
N/A

Properties

$apiRequest

$apiRequest : \App\IqrfNetModule\Requests\ApiRequest

Type

normal — IQRF Gateway Daemon's JSON API request

$wsClient

$wsClient : \App\IqrfNetModule\Models\WebSocketClient

Type

normal — WebSocket client

Methods

__construct()

__construct(\App\IqrfNetModule\Requests\ApiRequest  $apiRequest, \App\IqrfNetModule\Models\WebSocketClient  $wsClient) : mixed

Constructor

Parameters

\App\IqrfNetModule\Requests\ApiRequest $apiRequest

IQRF Gateway Daemon's JSON API request

\App\IqrfNetModule\Models\WebSocketClient $wsClient

WebSocket client

Returns

mixed

upload()

upload(string  $filePath, \App\IqrfNetModule\Enums\UploadFormats|null  $format = null) : array

Uploads a file into the coordinator

Parameters

string $filePath

Path to the file to upload

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

File format

Throws

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

Returns

array —

API request and response