Lizmap Web Client 3.11.0

serviceCtrl extends jController
in package

Php proxy to access map services.

Tags
author

3liz

copyright

2011-2022 3liz

see
http://3liz.com
license

Mozilla Public License : http://www.mozilla.org/MPL/

Table of Contents

Properties

$params  : mixed
$project  : null|Project
$repository  : null|Repository
$respCanBeCached  : null|bool
$services  : lizmapServices

Methods

getKeyValueConfig()  : jResponseJson|jResponseText|jResponseXml
Send the key/value JSON configuration file for a specified project.
getProjectConfig()  : jResponseJson|jResponseText|jResponseXml
Send the JSON configuration file for a specified project.
index()  : jResponse
Redirect to the appropriate action depending on the REQUEST parameter.
oldindex()  : mixed
Action for the old url of service having repository and action as parameters.
buildEtag()  : string
Build an Etag based on a key and the project (key, repository key, file time and config file time) and optionally the user.
canBeCached()  : bool
Check if cache can be used because it is impossible to use cache on other request type that GET or HEAD.
DescribeFeatureType()  : jResponseBinary
DescribeFeatureType.
evaluateAtlasFilenamePattern()  : null|string
Evaluate atlas filename pattern with feature data.
generateAtlasFilename()  : null|string
Generate atlas filename from QGIS project configuration for single feature requests.
GetCapabilities()  : jResponseBinary
GetCapabilities.
GetContext()  : jResponseBinary
GetContext.
GetFeature()  : jResponseBinary
GetFeature.
GetFeatureInfo()  : jResponseBinary
GetFeatureInfo.
getFilterToken()  : mixed
GetLegendGraphics()  : jResponseBinary
GetLegendGraphics.
GetMap()  : jResponseBinary|jResponseXml
GetMap.
GetPrint()  : jResponseBinary
GetPrint.
GetPrintAtlas()  : jResponseBinary
GetPrintAtlas.
GetProj4()  : jResponseText|jResponseXml
GetProj4.
GetSchemaExtension()  : jResponseBinary
GetSchemaExtension.
getSelectionToken()  : jResponseJson|jResponseXml
getServiceParameters()  : bool
Read parameters and set classes for the project and repository given.
GetStyles()  : jResponseBinary
GetStyles.
GetTile()  : jResponseBinary
iParam()  : null|string
Get a request parameter whatever its case and returns its value.
processOptionsRequests()  : jResponseText
construct the response to a CORS preflights request.
serviceException()  : jResponseXml
Send an OGC service Exception.
setACAOHeader()  : mixed
Set CORS headers on the response to allow an application other than Lizmap to access to the services.
setEtagCacheHeaders()  : jResponse
setupBinaryResponse()  : mixed
_getFilterToken()  : array<string|int, mixed>
_getSelectionToken()  : array<string|int, mixed>

Properties

Methods

getKeyValueConfig()

Send the key/value JSON configuration file for a specified project.

public getKeyValueConfig() : jResponseJson|jResponseText|jResponseXml
Tags
urlparam

string $repository Lizmap Repository

string $project Name of the project

Return values
jResponseJson|jResponseText|jResponseXml —

key/value JSON configuration file for the specified project or Service Exception

getProjectConfig()

Send the JSON configuration file for a specified project.

public getProjectConfig() : jResponseJson|jResponseText|jResponseXml
Tags
urlparam

string $repository Lizmap Repository

string $project Name of the project

Return values
jResponseJson|jResponseText|jResponseXml —

JSON configuration file for the specified project or Service Exception

index()

Redirect to the appropriate action depending on the REQUEST parameter.

public index() : jResponse
Tags
urlparam

$PROJECT Name of the project

$REQUEST Request type

Return values
jResponse —

Redirect to the corresponding action depending on the request parameters

oldindex()

Action for the old url of service having repository and action as parameters.

public oldindex() : mixed

We need this new action to map /service/ URL

buildEtag()

Build an Etag based on a key and the project (key, repository key, file time and config file time) and optionally the user.

protected buildEtag(string $key[, bool $user = true ]) : string
Parameters
$key : string

The first element of the Etag

$user : bool = true

Use the user to build the Etag

Return values
string —

the build Etag

canBeCached()

Check if cache can be used because it is impossible to use cache on other request type that GET or HEAD.

protected canBeCached() : bool
Return values
bool

DescribeFeatureType()

DescribeFeatureType.

protected DescribeFeatureType(WFSRequest $wfsRequest) : jResponseBinary
Parameters
$wfsRequest : WFSRequest
Tags
urlparam

string $repository Lizmap Repository

string $project Name of the project : mandatory

Return values
jResponseBinary —

JSON content

evaluateAtlasFilenamePattern()

Evaluate atlas filename pattern with feature data.

protected evaluateAtlasFilenamePattern(string $pattern, string $pageName) : null|string
Parameters
$pattern : string

The filename pattern (e.g., "'Flstk_'||replace(@atlas_pagename ,'/','-')")

$pageName : string

The page name value from the feature

Return values
null|string —

The evaluated filename or null if cannot evaluate

generateAtlasFilename()

Generate atlas filename from QGIS project configuration for single feature requests.

protected generateAtlasFilename(string $template, string $expFilter, string $layerName, string $format) : null|string
Parameters
$template : string

The print template name

$expFilter : string

The expression filter (e.g., "$id IN (123)")

$layerName : string

The layer name

$format : string

The output format (e.g., "pdf")

Return values
null|string —

The generated filename or null if cannot generate

GetContext()

GetContext.

protected GetContext(WMSRequest $wmsRequest) : jResponseBinary
Parameters
$wmsRequest : WMSRequest
Tags
urlparam

string $repository Lizmap Repository

string $project Name of the project : mandatory.

Return values
jResponseBinary —

text/xml Web Map Context

GetFeature()

GetFeature.

protected GetFeature(WFSRequest $wfsRequest) : jResponseBinary
Parameters
$wfsRequest : WFSRequest
Tags
urlparam

string $repository Lizmap Repository

string $project Name of the project : mandatory

Return values
jResponseBinary —

WFS GetFeature response

GetFeatureInfo()

GetFeatureInfo.

protected GetFeatureInfo(WMSRequest $wmsRequest) : jResponseBinary
Parameters
$wmsRequest : WMSRequest
Tags
urlparam

string $repository Lizmap Repository

string $project Name of the project : mandatory

Return values
jResponseBinary —

feature Info

GetLegendGraphics()

GetLegendGraphics.

protected GetLegendGraphics(WMSRequest $wmsRequest) : jResponseBinary
Parameters
$wmsRequest : WMSRequest
Tags
urlparam

string $repository Lizmap Repository

string $project Name of the project : mandatory

Return values
jResponseBinary —

Image of the legend for 1 to n layers, returned by the Map Server

GetMap()

GetMap.

protected GetMap(WMSRequest $wmsRequest) : jResponseBinary|jResponseXml
Parameters
$wmsRequest : WMSRequest
Tags
urlparam

string $repository Lizmap Repository

string $project Name of the project : mandatory

Return values
jResponseBinary|jResponseXml —

image rendered by the Map Server or Service Exception

GetPrint()

GetPrint.

protected GetPrint(WMSRequest $wmsRequest) : jResponseBinary
Parameters
$wmsRequest : WMSRequest
Tags
urlparam

string $repository Lizmap Repository

string $project Name of the project : mandatory

Return values
jResponseBinary —

image rendered by the Map Server

GetPrintAtlas()

GetPrintAtlas.

protected GetPrintAtlas(WMSRequest $wmsRequest) : jResponseBinary
Parameters
$wmsRequest : WMSRequest
Tags
urlparam

string $repository Lizmap Repository

string $project Name of the project : mandatory

Return values
jResponseBinary —

image rendered by the Map Server

GetProj4()

GetProj4.

protected GetProj4() : jResponseText|jResponseXml
Tags
urlparam

string $repository Lizmap Repository

string $project Name of the project : mandatory

string $authid SRS or CRS authid like USER:*

Return values
jResponseText|jResponseXml

GetSchemaExtension()

GetSchemaExtension.

protected GetSchemaExtension(WMSRequest $wmsRequest) : jResponseBinary
Parameters
$wmsRequest : WMSRequest
Tags
urlparam

string $SERVICE mandatory, has to be WMS

string $REQUEST mandatory, has to be GetSchemaExtension

Return values
jResponseBinary —

text/xml the WMS GetSchemaExtension 1.3.0 Schema Extension.

getSelectionToken()

protected getSelectionToken() : jResponseJson|jResponseXml
Return values
jResponseJson|jResponseXml

getServiceParameters()

Read parameters and set classes for the project and repository given.

protected getServiceParameters([bool $forOptionsMethodOnly = false ]) : bool
Parameters
$forOptionsMethodOnly : bool = false

set it to true for HTTP request with OPTIONS method so it will load only the required resources

Return values
bool —

false if some request parameters are missing

GetStyles()

GetStyles.

protected GetStyles(WMSRequest $wmsRequest) : jResponseBinary
Parameters
$wmsRequest : WMSRequest
Tags
urlparam

string $repository Lizmap Repository

string $project Name of the project : mandatory

Return values
jResponseBinary —

SLD Style XML

iParam()

Get a request parameter whatever its case and returns its value.

protected iParam(string $param) : null|string
Parameters
$param : string

request parameter

Return values
null|string —

request parameter value

serviceException()

Send an OGC service Exception.

protected serviceException() : jResponseXml
Return values
jResponseXml —

XML OGC Service Exception

setACAOHeader()

Set CORS headers on the response to allow an application other than Lizmap to access to the services.

protected setACAOHeader(jResponse $resp) : mixed

Authorized application are sets into repository properties

Parameters
$resp : jResponse

setEtagCacheHeaders()

protected setEtagCacheHeaders(jResponse $resp, string $etag) : jResponse
Parameters
$resp : jResponse
$etag : string
Return values
jResponse —

the response updated

setupBinaryResponse()

protected setupBinaryResponse(jResponseBinary $rep, mixed $ogcResult, mixed $filename[, mixed $eTag = '' ]) : mixed
Parameters
$rep : jResponseBinary
$ogcResult : mixed
$filename : mixed
$eTag : mixed = ''

_getFilterToken()

private _getFilterToken(string $repository, string $project, string $typename, string $filter) : array<string|int, mixed>
Parameters
$repository : string
$project : string
$typename : string
$filter : string
Return values
array<string|int, mixed>

_getSelectionToken()

private _getSelectionToken(string $repository, string $project, string $typename, string $ids) : array<string|int, mixed>
Parameters
$repository : string
$project : string
$typename : string
$ids : string
Return values
array<string|int, mixed>
On this page

Search results