\App\ConfigModule\ModelsMigrationManager

Tool for migrating configuration

Summary

Methods
Properties
Constants
__construct()
createArchive()
download()
extractArchive()
upload()
validate()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
changeOwner()
$commandManager
$schemaManager
$configDirectory
$serviceManager
N/A

Properties

$commandManager

$commandManager : \App\CoreModule\Models\CommandManager

Type

normal — Command manager

$schemaManager

$schemaManager : \App\ConfigModule\Models\ComponentSchemaManager

Type

normal — JSON schema manager

$configDirectory

$configDirectory : string

Type

normal — Path to a directory with a configuration of IQRF Gateway Daemon

$serviceManager

$serviceManager : \App\ServiceModule\Models\ServiceManager

Type

normal — Service manager

Methods

__construct()

__construct(string  $configDirectory, \App\CoreModule\Models\CommandManager  $commandManager, \App\ConfigModule\Models\ComponentSchemaManager  $schemaManager, \App\ServiceModule\Models\ServiceManager  $serviceManager) : mixed

Constructor

Parameters

string $configDirectory

Path to a directory with a configuration of IQRF Gateway Daemon

\App\CoreModule\Models\CommandManager $commandManager

Command manager

\App\ConfigModule\Models\ComponentSchemaManager $schemaManager

JSON schema manager

\App\ServiceModule\Models\ServiceManager $serviceManager

Service manager

Returns

mixed

createArchive()

createArchive() : string

Create an archive with the configuration

Returns

string —

Path to archive with the configuration

download()

download() : \Nette\Application\Responses\FileResponse

Downloads a configuration

Throws

\Nette\Application\BadRequestException

Returns

\Nette\Application\Responses\FileResponse —

HTTP response with a configuration

extractArchive()

extractArchive(string  $path) : void

Extracts an archive with scheduler configuration

Parameters

string $path

Path to archive with scheduler configuration

Throws

\App\ConfigModule\Exceptions\IncompleteConfigurationException
\Nette\Utils\JsonException
\App\ServiceModule\Exceptions\UnsupportedInitSystemException

upload()

upload(\Nette\Http\FileUpload  $zip) : void

Uploads a configuration

Parameters

\Nette\Http\FileUpload $zip

IP archive with the configuration

Throws

\App\ConfigModule\Exceptions\IncompleteConfigurationException
\App\ConfigModule\Exceptions\InvalidConfigurationFormatException
\Nette\Utils\JsonException
\App\ServiceModule\Exceptions\UnsupportedInitSystemException

validate()

validate(\App\CoreModule\Models\ZipArchiveManager  $zipManager) : bool

Validates JSON configuration files for IQRF Gateway Daemon

Parameters

\App\CoreModule\Models\ZipArchiveManager $zipManager

ZIP archive manager

Throws

\Nette\Utils\JsonException

Returns

bool —

Are JSON files valid?

changeOwner()

changeOwner() : void

Changes ownership of directory for JSON configuration files of IQRF Gateway Daemon