\App\ConfigModule\ModelsGenericManager

Generic configuration form factory

Summary

Methods
Properties
Constants
__construct()
delete()
getInstanceFiles()
list()
load()
fixRequiredInterfaces()
getInstanceByProperty()
save()
generateFileName()
getFileName()
setFileName()
getMessagings()
getComponentInstances()
setComponent()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(\App\ConfigModule\Models\JsonFileManager  fileManager, \App\ConfigModule\Models\JsonSchemaManager  schemaManager) : 

Constructor

Parameters

\App\ConfigModule\Models\JsonFileManager fileManager

JSON file manager

\App\ConfigModule\Models\JsonSchemaManager schemaManager

JSON schema manager

Returns

delete()

delete(  id) : 

Deletes a configuration

Parameters

id

Configuration ID

Throws

\App\ConfigModule\Models\IOException
\App\ConfigModule\Models\JsonException

Returns

getInstanceFiles()

getInstanceFiles() : string||string|int

Gets component's instance files

Throws

\App\ConfigModule\Models\IOException
\App\ConfigModule\Models\JsonException

Returns

string||string|int —

Files with component's instances

list()

list() : mixed||string|int

Get a list of configurations

Throws

\App\ConfigModule\Models\IOException
\App\ConfigModule\Models\JsonException

Returns

mixed||string|int —

Configurations

load()

load(  id) : mixed||string|int

Loads the configuration

Parameters

id

Configuration ID

Throws

\App\ConfigModule\Models\IOException
\App\ConfigModule\Models\JsonException

Returns

mixed||string|int —

Configuration in an array

fixRequiredInterfaces()

fixRequiredInterfaces(mixed||string|int  configuration) : 

Fixes the required interfaces in the configuration

Parameters

mixed||string|int configuration

Configuration to fix

Throws

\App\ConfigModule\Models\IOException
\App\ConfigModule\Models\JsonException

Returns

getInstanceByProperty()

getInstanceByProperty(  type,   value) : string|null

Gets an instance file name with the property

Parameters

type

Property type

value

Property value

Throws

\App\ConfigModule\Models\IOException
\App\ConfigModule\Models\JsonException

Returns

string|null —

Instance file name

save()

save(mixed||string|int  array) : 

Saves the configuration

Parameters

mixed||string|int array

Configuration in an array

Throws

\App\ConfigModule\Models\IOException
\App\ConfigModule\Models\JsonException

Returns

generateFileName()

generateFileName(mixed||string|int  array) : 

Generates a configuration file name

Parameters

mixed||string|int array

Configuration from form

Returns

getFileName()

getFileName() : 

Gets the file name

Returns

File name (without .json)

setFileName()

setFileName(  fileName) : 

Sets the file name

Parameters

fileName

File name (without .json)

Returns

getMessagings()

getMessagings() : string[]||string|int

Gets available messagings

Throws

\App\ConfigModule\Models\JsonException

Returns

string[]||string|int —

Available messagings

getComponentInstances()

getComponentInstances(  component) : string||string|int

Gets available instances of component

Parameters

component

Component

Throws

\App\ConfigModule\Models\JsonException

Returns

string||string|int —

Available instances of component

setComponent()

setComponent(  component) : 

Sets the component type

Parameters

component

Component name

Returns