\App\CloudModule\ModelsIbmCloudManager

Tool for managing MQTT connection into IBM Cloud

Summary

Methods
Properties
Constants
__construct()
createMqttInterface()
downloadCaCertificate()
No public properties found
CA_FILENAME
No protected methods found
No protected properties found
N/A
createDirectory()
$certPath
$configManager
$client
N/A

Constants

CA_FILENAME

CA_FILENAME = 'ibm-cloud-ca.crt' : 

CA certificate filename

Properties

$certPath

$certPath : string

Type

normal — Path to the certificates

$configManager

$configManager : \App\ConfigModule\Models\GenericManager

Type

normal — Generic configuration manager

$client

$client : \GuzzleHttp\ClientInterface

Type

\GuzzleHttp\ClientInterface — HTTP(S) client

Methods

__construct()

__construct(string  $certPath, \App\ConfigModule\Models\GenericManager  $configManager, \GuzzleHttp\ClientInterface  $client) : mixed

Constructor

Parameters

string $certPath

Path to the certificates

\App\ConfigModule\Models\GenericManager $configManager

Generic config manager

\GuzzleHttp\ClientInterface $client

HTTP(S) client

Returns

mixed

createMqttInterface()

createMqttInterface(array  $values) : void

Creates a new MQTT interface

Parameters

array $values

Values from form

Throws

\GuzzleHttp\Exception\GuzzleException
\Nette\Utils\JsonException

downloadCaCertificate()

downloadCaCertificate() : void

Downloads the root CA certificate

Throws

\GuzzleHttp\Exception\GuzzleException
\Nette\IOException

createDirectory()

createDirectory() : void

Create a directory for certificates

Throws

\App\CloudModule\Exceptions\CannotCreateCertificateDirectoryException