\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) : 

Delete a configuration

Parameters

id

Configuration ID

Throws

\App\ConfigModule\Models\JsonException

Returns

getInstanceFiles()

getInstanceFiles() : mixed||string|int

Get component's instance files

Throws

\App\ConfigModule\Models\JsonException

Returns

mixed||string|int —

Files with component's instances

list()

list() : mixed||string|int

List configurations

Throws

\App\ConfigModule\Models\JsonException

Returns

mixed||string|int —

Configurations

load()

load(  id) : mixed||string|int

Load a configuration

Parameters

id

Configuration ID

Throws

\App\ConfigModule\Models\JsonException

Returns

mixed||string|int —

Configuration in an array

fixRequiredInterfaces()

fixRequiredInterfaces(mixed||string|int  configuration) : 

Fix a required interfaces in the configuration

Parameters

mixed||string|int configuration

Configuration to fix

Throws

\App\ConfigModule\Models\JsonException

Returns

getInstanceByProperty()

getInstanceByProperty(  type,   value) : string|null

Get an instance file name with the property

Parameters

type

Property type

value

Property value

Throws

\App\ConfigModule\Models\JsonException

Returns

string|null —

Instance file name

save()

save(mixed||string|int  array) : 

Save configuration

Parameters

mixed||string|int array

Settings

Throws

\App\ConfigModule\Models\JsonException

Returns

generateFileName()

generateFileName(mixed||string|int  array) : 

Generate a configuration file name

Parameters

mixed||string|int array

Configuration from form

Returns

getFileName()

getFileName() : 

Get file name

Returns

File name (without .json)

setFileName()

setFileName(  fileName) : 

Set file name

Parameters

fileName

File name (without .json)

Returns

getMessagings()

getMessagings() : mixed||string|int

Get available messagings

Throws

\App\ConfigModule\Models\JsonException

Returns

mixed||string|int —

Available messagings

getComponentInstances()

getComponentInstances(  component) : mixed||string|int

Get available instances of component

Parameters

component

Component

Throws

\App\ConfigModule\Models\JsonException

Returns

mixed||string|int —

Available instances of component

setComponent()

setComponent(  component) : 

Set component type

Parameters

component

Component name

Returns