Manager
Table of Contents
Constants
- APP_TEMPLATE_IS_NOT_EXISTS = 5
- EMPTY_REQUIRED = 4
- FAIL = 0
- IS_ALREADY_EXISTS = 3
- PREVIEW_IMAGE_SIZE = 150
- SIMPLE_APP_TEMPLATE = "simple"
- SUCCESS = 1
Methods
- addConfig() : bool
- Add configuration to application
- bindTemplate() : mixed
- Binds (and creates if it's necessary) template to the application folder
- copyFromTemplate() : bool
- Checks if the configuration is already exists
- createApp() : int
- Creates a new application with "global" configuration by default
- getAppFiles() : array<string|int, mixed>
- Return files of the application
- getConfigJSON() : string
- Return configuration in JSON format
- registerFileInApp() : mixed
- Binds file to the application
- removeApp() : bool
- Removes application by code
- removeConfig() : bool
- Removes configuration
- unregisterFileInApp() : mixed
- Unbinds file
- updateConfig() : bool
- Updates configuration
Constants
APP_TEMPLATE_IS_NOT_EXISTS
public
mixed
APP_TEMPLATE_IS_NOT_EXISTS
= 5
EMPTY_REQUIRED
public
mixed
EMPTY_REQUIRED
= 4
FAIL
public
mixed
FAIL
= 0
IS_ALREADY_EXISTS
public
mixed
IS_ALREADY_EXISTS
= 3
PREVIEW_IMAGE_SIZE
public
mixed
PREVIEW_IMAGE_SIZE
= 150
SIMPLE_APP_TEMPLATE
public
mixed
SIMPLE_APP_TEMPLATE
= "simple"
SUCCESS
public
mixed
SUCCESS
= 1
Methods
addConfig()
Add configuration to application
public
static addConfig([string $appCode = "" ], mixed $platform[, array<string|int, mixed> $config = array() ]) : bool
Parameters
- $appCode : string = ""
-
- application code
- $platform : mixed
-
- platform code
- $config : array<string|int, mixed> = array()
-
- configuration
Tags
Return values
boolbindTemplate()
Binds (and creates if it's necessary) template to the application folder
public
static bindTemplate(mixed $templateId, mixed $folder, bool $createNew) : mixed
Parameters
- $templateId : mixed
-
- symbolic code of the template
- $folder : mixed
-
- the application folder
- $createNew : bool
-
- flag of the necessity of creating a new template
copyFromTemplate()
Checks if the configuration is already exists
public
static copyFromTemplate(mixed $folder, mixed $appCode[, bool $useOffline = false ][, string $templateCode = "simple" ]) : bool
Parameters
- $folder : mixed
- $appCode : mixed
-
- application code
- $useOffline : bool = false
- $templateCode : string = "simple"
Tags
Return values
boolcreateApp()
Creates a new application with "global" configuration by default
public
static createApp([string $appCode = "" ][, array<string|int, mixed> $data = array() ][, array<string|int, mixed> $initConfig = array() ]) : int
Parameters
- $appCode : string = ""
-
- application code
- $data : array<string|int, mixed> = array()
-
- application data (name, short name, folder and etc)
- $initConfig : array<string|int, mixed> = array()
Tags
Return values
intgetAppFiles()
Return files of the application
public
static getAppFiles(mixed $appCode) : array<string|int, mixed>
Parameters
- $appCode : mixed
-
- application code
Return values
array<string|int, mixed>getConfigJSON()
Return configuration in JSON format
public
static getConfigJSON(mixed $appCode[, bool $platform = false ]) : string
Parameters
- $appCode : mixed
-
- application code
- $platform : bool = false
-
- platform code
Tags
Return values
stringregisterFileInApp()
Binds file to the application
public
static registerFileInApp(mixed &$fileArray, mixed $appCode) : mixed
Parameters
- $fileArray : mixed
-
- file array
- $appCode : mixed
-
- application code
removeApp()
Removes application by code
public
static removeApp(string $appCode) : bool
Parameters
- $appCode : string
-
application code
Return values
boolremoveConfig()
Removes configuration
public
static removeConfig([string $appCode = "" ][, array<string|int, mixed> $platform = array() ]) : bool
Parameters
- $appCode : string = ""
-
- application code
- $platform : array<string|int, mixed> = array()
-
- platform code
Tags
Return values
boolunregisterFileInApp()
Unbinds file
public
static unregisterFileInApp(mixed $fileId, mixed $appCode) : mixed
Parameters
- $fileId : mixed
-
- identifier of file in b_file table
- $appCode : mixed
-
- application code
updateConfig()
Updates configuration
public
static updateConfig([string $appCode = "" ][, array<string|int, mixed> $platform = "" ][, array<string|int, mixed> $config = array() ]) : bool
Parameters
- $appCode : string = ""
-
application code
- $platform : array<string|int, mixed> = ""
-
platform code
- $config : array<string|int, mixed> = array()
-
new configuration