serviceCtrl
extends jController
in package
Php proxy to access map services.
Tags
Table of Contents
Properties
- $params : mixed
- $project : null|Project
- $repository : null|lizmapRepository
- $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.
- 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.
- 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
$params
protected
mixed
$params
= array()
$project
protected
null|Project
$project
$repository
protected
null|lizmapRepository
$repository
$respCanBeCached
protected
null|bool
$respCanBeCached
$services
protected
lizmapServices
$services
= ''
Methods
getKeyValueConfig()
Send the key/value JSON configuration file for a specified project.
public
getKeyValueConfig() : jResponseJson|jResponseText|jResponseXml
Tags
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
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
Return values
jResponse —Redirect to the corresponding action depending on the request parameters
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
boolDescribeFeatureType()
DescribeFeatureType.
protected
DescribeFeatureType(WFSRequest $wfsRequest) : jResponseBinary
Parameters
- $wfsRequest : WFSRequest
Tags
Return values
jResponseBinary —JSON content
GetCapabilities()
GetCapabilities.
protected
GetCapabilities(WFSRequest|WMSRequest|WMTSRequest $ogcRequest) : jResponseBinary
Parameters
- $ogcRequest : WFSRequest|WMSRequest|WMTSRequest
Tags
Return values
jResponseBinary —JSON configuration file for the specified project
GetContext()
GetContext.
protected
GetContext(WMSRequest $wmsRequest) : jResponseBinary
Parameters
- $wmsRequest : WMSRequest
Tags
Return values
jResponseBinary —text/xml Web Map Context
GetFeature()
GetFeature.
protected
GetFeature(WFSRequest $wfsRequest) : jResponseBinary
Parameters
- $wfsRequest : WFSRequest
Tags
Return values
jResponseBinary —WFS GetFeature response
GetFeatureInfo()
GetFeatureInfo.
protected
GetFeatureInfo(WMSRequest $wmsRequest) : jResponseBinary
Parameters
- $wmsRequest : WMSRequest
Tags
Return values
jResponseBinary —feature Info
getFilterToken()
protected
getFilterToken() : mixed
GetLegendGraphics()
GetLegendGraphics.
protected
GetLegendGraphics(WMSRequest $wmsRequest) : jResponseBinary
Parameters
- $wmsRequest : WMSRequest
Tags
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
Return values
jResponseBinary|jResponseXml —image rendered by the Map Server or Service Exception
GetPrint()
GetPrint.
protected
GetPrint(WMSRequest $wmsRequest) : jResponseBinary
Parameters
- $wmsRequest : WMSRequest
Tags
Return values
jResponseBinary —image rendered by the Map Server
GetPrintAtlas()
GetPrintAtlas.
protected
GetPrintAtlas(WMSRequest $wmsRequest) : jResponseBinary
Parameters
- $wmsRequest : WMSRequest
Tags
Return values
jResponseBinary —image rendered by the Map Server
GetProj4()
GetProj4.
protected
GetProj4() : jResponseText|jResponseXml
Tags
Return values
jResponseText|jResponseXmlGetSchemaExtension()
GetSchemaExtension.
protected
GetSchemaExtension(WMSRequest $wmsRequest) : jResponseBinary
Parameters
- $wmsRequest : WMSRequest
Tags
Return values
jResponseBinary —text/xml the WMS GetSchemaExtension 1.3.0 Schema Extension.
getSelectionToken()
protected
getSelectionToken() : jResponseJson|jResponseXml
Return values
jResponseJson|jResponseXmlgetServiceParameters()
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
Return values
jResponseBinary —SLD Style XML
GetTile()
protected
GetTile(WMTSRequest $wmtsRequest) : jResponseBinary
Parameters
- $wmtsRequest : WMTSRequest
Return values
jResponseBinaryiParam()
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
processOptionsRequests()
construct the response to a CORS preflights request.
protected
processOptionsRequests() : jResponseText
This kind of requests are made by browsers before fetching a resource
Tags
Return values
jResponseTextserviceException()
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