lizmapServices
in package
Manage and give access to lizmap configuration.
Tags
Table of Contents
Properties
- $adminContactEmail : string
- Admin contact email.
- $adminSenderEmail : string
- Administrator sender email.
- $adminSenderName : string
- Administrator sender name.
- $allInMap : mixed
- Display all project in maps.
- $allowUserAccountRequests : mixed
- If we allow to view the form to request an account.
- $appName : string
- Application name.
- $cacheExpiration : string
- Cache expiration.
- $cacheRedisDb : string
- Redis DB.
- $cacheRedisHost : string
- Redis host.
- $cacheRedisKeyPrefix : string
- Redis key prefix.
- $cacheRedisKeyPrefixFlushMethod : string
- Method to flush keys when $cacheRedisKeyPrefix is set.
- $cacheRedisPort : string
- Redis port.
- $cacheRootDirectory : string
- Cache root directory.
- $cacheStorageType : string
- Map cache server type.
- $debugMode : mixed
- Debug mode : none or log.
- $defaultProject : string
- Default project in default repository.
- $defaultRepository : string
- Default repository.
- $googleAnalyticsID : string
- Application ID for Google Analytics.
- $lizmapPluginAPIURL : string
- URL to the API exposed by the Lizmap plugin for QGIS Server.
- $onlyMaps : mixed
- Do not display Lizmap projects page.
- $projectSwitcher : mixed
- Show projects switcher in maps page.
- $proxyHttpBackend : string
- backend to use to do http request : use curl ('curl') or file_get_contents ('php').
- $qgisProjectsPrivateDataFolder : string
- Root folder of QGIS project inspection data output files (qgis-project-validator).
- $qgisServerVersion : string
- QGIS Server version For external modules only, which are still using the variable.
- $relativeWMSPath : string
- Does the server use relative Path from root folder?
- $requestProxyEnabled : bool
- Map cache server.
- $requestProxyHost : string
- Proxy host.
- $requestProxyNotForDomain : string
- List of domains separated by a comma, to which the proxy is not used.
- $requestProxyPassword : string
- Proxy password.
- $requestProxyPort : string
- Proxy port.
- $requestProxyType : string
- Proxy type: 'http' or 'socks5'. Only used with the curl proxyHttpBackend.
- $requestProxyUser : string
- Proxy user.
- $rootRepositories : string
- Root folder of repositories.
- $uploadedImageMaxWidthHeight : int
- Uploaded image maximum width and height.
- $wmsMaxHeight : int
- WMS max height.
- $wmsMaxWidth : int
- WMS max width.
- $wmsPublicUrlList : string
- Public WMS list.
- $wmsServerHeaders : array<string|int, mixed>
- Headers to send to WMS map server.
- $wmsServerURL : string
- QGIS Server URL.
- $appContext : mixed
- $data : mixed
- Lizmap configuration data from lizmapConfig.ini.php This allow to access to configuration properties that are not exposed via properties member for this class.
- $globalConfig : mixed
- $globalConfigProperties : array<string|int, mixed>
- List of properties mapped to a parameter of the main configuration of Jelix.
- $isUsingLdap : mixed
- $metricsEnabled : bool|int
- $notEditableProperties : array<string|int, string>
- List of properties that are not editable at all.
- $properties : mixed
- List of all properties of lizmapServices that are editable in the configuration form of Lizmap.
- $sensitiveProperties : mixed
- services properties to not display into the configuration form, when hideSensitiveServicesProperties is set to 1.
- $varPath : mixed
Methods
- __construct() : mixed
- constructor method.
- areMetricsEnabled() : bool|int
- getLizmapRepository() : lizmapRepository
- This method will create and return a lizmapRepository instance.
- getProperties() : mixed
- getQgisProjectsPrivateDataFolder() : string
- Get the path where the inspection data generated by qgis-project-validator tool are stored. If not found, use the rootRepositories folder.
- getRootRepositories() : mixed
- getSensitiveProperties() : mixed
- hideSensitiveProperties() : mixed
- isLdapEnabled() : mixed
- isRelativeWMSPath() : mixed
- isSmtpEnabled() : mixed
- modify() : mixed
- Modify the services.
- saveIntoIni() : mixed
- sendNotificationEmail() : mixed
Properties
$adminContactEmail
Admin contact email.
public
string
$adminContactEmail
= ''
$adminSenderEmail
Administrator sender email.
public
string
$adminSenderEmail
= ''
$adminSenderName
Administrator sender name.
public
string
$adminSenderName
= ''
$allInMap
Display all project in maps.
public
mixed
$allInMap
= ''
$allowUserAccountRequests
If we allow to view the form to request an account.
public
mixed
$allowUserAccountRequests
= ''
$appName
Application name.
public
string
$appName
= 'Lizmap'
$cacheExpiration
Cache expiration.
public
string
$cacheExpiration
= ''
$cacheRedisDb
Redis DB.
public
string
$cacheRedisDb
= ''
$cacheRedisHost
Redis host.
public
string
$cacheRedisHost
= 'localhost'
$cacheRedisKeyPrefix
Redis key prefix.
public
string
$cacheRedisKeyPrefix
= ''
$cacheRedisKeyPrefixFlushMethod
Method to flush keys when $cacheRedisKeyPrefix is set.
public
string
$cacheRedisKeyPrefixFlushMethod
= ''
Tags
$cacheRedisPort
Redis port.
public
string
$cacheRedisPort
= '6379'
$cacheRootDirectory
Cache root directory.
public
string
$cacheRootDirectory
= ''
$cacheStorageType
Map cache server type.
public
string
$cacheStorageType
= ''
$debugMode
Debug mode : none or log.
public
mixed
$debugMode
= ''
$defaultProject
Default project in default repository.
public
string
$defaultProject
= ''
$defaultRepository
Default repository.
public
string
$defaultRepository
= ''
$googleAnalyticsID
Application ID for Google Analytics.
public
string
$googleAnalyticsID
= ''
$lizmapPluginAPIURL
URL to the API exposed by the Lizmap plugin for QGIS Server.
public
string
$lizmapPluginAPIURL
= ''
$onlyMaps
Do not display Lizmap projects page.
public
mixed
$onlyMaps
= ''
$projectSwitcher
Show projects switcher in maps page.
public
mixed
$projectSwitcher
= ''
$proxyHttpBackend
backend to use to do http request : use curl ('curl') or file_get_contents ('php').
public
string
$proxyHttpBackend
= ''
leave empty to have automatic selection (it will use curl if the curl extension is installed). Fill it only for tests.
$qgisProjectsPrivateDataFolder
Root folder of QGIS project inspection data output files (qgis-project-validator).
public
string
$qgisProjectsPrivateDataFolder
= ''
$qgisServerVersion
QGIS Server version For external modules only, which are still using the variable.
Use the Server
public
string
$qgisServerVersion
= '3.0'
Tags
$relativeWMSPath
Does the server use relative Path from root folder?
public
string
$relativeWMSPath
= '0'
$requestProxyEnabled
Map cache server.
public
bool
$requestProxyEnabled
= \false
$requestProxyHost
Proxy host.
public
string
$requestProxyHost
= ''
$requestProxyNotForDomain
List of domains separated by a comma, to which the proxy is not used.
public
string
$requestProxyNotForDomain
= 'localhost,127.0.0.1'
$requestProxyPassword
Proxy password.
public
string
$requestProxyPassword
= ''
$requestProxyPort
Proxy port.
public
string
$requestProxyPort
= ''
$requestProxyType
Proxy type: 'http' or 'socks5'. Only used with the curl proxyHttpBackend.
public
string
$requestProxyType
= 'http'
$requestProxyUser
Proxy user.
public
string
$requestProxyUser
= ''
$rootRepositories
Root folder of repositories.
public
string
$rootRepositories
= ''
$uploadedImageMaxWidthHeight
Uploaded image maximum width and height.
public
int
$uploadedImageMaxWidthHeight
= 1920
$wmsMaxHeight
WMS max height.
public
int
$wmsMaxHeight
= 3000
$wmsMaxWidth
WMS max width.
public
int
$wmsMaxWidth
= 3000
$wmsPublicUrlList
Public WMS list.
public
string
$wmsPublicUrlList
= ''
$wmsServerHeaders
Headers to send to WMS map server.
public
array<string|int, mixed>
$wmsServerHeaders
= array()
$wmsServerURL
QGIS Server URL.
public
string
$wmsServerURL
= ''
$appContext
protected
mixed
$appContext
$data
Lizmap configuration data from lizmapConfig.ini.php This allow to access to configuration properties that are not exposed via properties member for this class.
private
mixed
$data
= array()
$globalConfig
private
mixed
$globalConfig
$globalConfigProperties
List of properties mapped to a parameter of the main configuration of Jelix.
private
array<string|int, mixed>
$globalConfigProperties
= array(
// property name => array(ini parameter name, ini section name)
'allowUserAccountRequests' => array('registrationEnabled', 'jcommunity'),
'adminSenderEmail' => array('webmasterEmail', 'mailer'),
'adminSenderName' => array('webmasterName', 'mailer'),
)
$isUsingLdap
private
mixed
$isUsingLdap
= \false
$metricsEnabled
private
bool|int
$metricsEnabled
= \false
true/1 if metrics should be sent to the metric logger
$notEditableProperties
List of properties that are not editable at all.
private
array<string|int, string>
$notEditableProperties
= array('cacheRedisKeyPrefixFlushMethod', 'wmsServerHeaders', 'metricsEnabled')
$properties
List of all properties of lizmapServices that are editable in the configuration form of Lizmap.
private
mixed
$properties
= array('appName', 'wmsServerURL', 'wmsPublicUrlList', 'wmsMaxWidth', 'wmsMaxHeight', 'lizmapPluginAPIURL', 'cacheStorageType', 'cacheExpiration', 'defaultRepository', 'defaultProject', 'onlyMaps', 'projectSwitcher', 'rootRepositories', 'qgisProjectsPrivateDataFolder', 'relativeWMSPath', 'proxyHttpBackend', 'requestProxyEnabled', 'requestProxyHost', 'requestProxyPort', 'requestProxyUser', 'requestProxyPassword', 'requestProxyType', 'requestProxyNotForDomain', 'debugMode', 'cacheRootDirectory', 'cacheRedisHost', 'cacheRedisPort', 'cacheRedisDb', 'cacheRedisKeyPrefix', 'allowUserAccountRequests', 'adminContactEmail', 'adminSenderEmail', 'adminSenderName', 'googleAnalyticsID', 'uploadedImageMaxWidthHeight')
properties values are stored into lizmapConfig.ini.php or the main configuration.
$sensitiveProperties
services properties to not display into the configuration form, when hideSensitiveServicesProperties is set to 1.
private
mixed
$sensitiveProperties
= array('wmsServerURL', 'wmsPublicUrlList', 'wmsMaxWidth', 'wmsMaxHeight', 'lizmapPluginAPIURL', 'cacheStorageType', 'cacheExpiration', 'rootRepositories', 'qgisProjectsPrivateDataFolder', 'relativeWMSPath', 'requestProxyEnabled', 'requestProxyHost', 'requestProxyPort', 'requestProxyUser', 'requestProxyPassword', 'requestProxyType', 'requestProxyNotForDomain', 'debugMode', 'cacheRootDirectory', 'cacheRedisHost', 'cacheRedisPort', 'cacheRedisDb', 'cacheRedisKeyPrefix', 'adminSenderEmail', 'proxyHttpBackend')
$varPath
private
mixed
$varPath
= ''
Methods
__construct()
constructor method.
public
__construct(array<string|int, mixed> $readConfigPath, object $globalConfig, bool $ldapEnabled, string $varPath, mixed $appContext) : mixed
Parameters
- $readConfigPath : array<string|int, mixed>
-
the lizmapConfig ini file put in an array
- $globalConfig : object
-
the jelix configuration
- $ldapEnabled : bool
-
true if ldapdao module is enabled
- $varPath : string
-
the configuration files path given by jApp::varPath()
- $appContext : mixed
areMetricsEnabled()
public
areMetricsEnabled() : bool|int
Return values
bool|intgetLizmapRepository()
This method will create and return a lizmapRepository instance.
public
getLizmapRepository(string $key) : lizmapRepository
Parameters
- $key : string
-
the name of the repository
Return values
lizmapRepository —The lizmapRepository instance
getProperties()
public
getProperties() : mixed
getQgisProjectsPrivateDataFolder()
Get the path where the inspection data generated by qgis-project-validator tool are stored. If not found, use the rootRepositories folder.
public
getQgisProjectsPrivateDataFolder() : string
Return values
string —Path of the folder containing the inspection data
getRootRepositories()
public
getRootRepositories() : mixed
getSensitiveProperties()
public
getSensitiveProperties() : mixed
hideSensitiveProperties()
public
hideSensitiveProperties() : mixed
isLdapEnabled()
public
isLdapEnabled() : mixed
isRelativeWMSPath()
public
isRelativeWMSPath() : mixed
isSmtpEnabled()
public
isSmtpEnabled() : mixed
modify()
Modify the services.
public
modify(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
array containing the data of the services
saveIntoIni()
public
saveIntoIni(mixed $ini, mixed $liveIni) : mixed
Parameters
- $ini : mixed
- $liveIni : mixed
sendNotificationEmail()
public
sendNotificationEmail(mixed $subject, mixed $body) : mixed
Parameters
- $subject : mixed
- $body : mixed