Lizmap Web Client Master

WFSRequest extends OGCRequest
in package

Tags
see
https://en.wikipedia.org/wiki/Web_Feature_Service.

Table of Contents

Properties

$appContext  : AppContextInterface
$blockSqlWords  : mixed
$datasource  : null|object
$editingContext  : bool
$params  : array<string|int, mixed>
$project  : Project
$qgisLayer  : null|qgisVectorLayer
$repository  : Repository
$requestXml  : null|string
$selectFields  : mixed
$services  : lizmapServices
$tplExceptions  : string
$wfs_typename  : null|string

Methods

__construct()  : mixed
constructor.
getEditingContext()  : bool
param()  : mixed
Get the value of a request parameter. If not defined, gets its default value.
parameters()  : array<string|int, mixed>
Provide the parameters with the lizmap extra parameters for filtering the request.
process()  : object
Process the OGC Request Checks the request parameter and performs the right method.
requestedTypename()  : string
Get the requested typename based on TYPENAME or FEATUREID parameter.
setEditingContext()  : bool
Set the edition context for request.
buildQueryBase()  : mixed
constructUrl()  : string
Build the URL to request QGIS Server.
getBboxSql()  : string
Get the SQL clause to instersects bbox in the request parameters.
getFeatureIdFilterExp()  : string
getfeaturePostgres()  : OGCResponse
Queries The PostGreSQL Server for getFeature.
getfeatureQgis()  : OGCResponse
Queries Qgis Server for getFeature.
getQueryOrder()  : mixed
loadXmlString()  : mixed
parseExpFilter()  : mixed
parseFeatureId()  : mixed
process_describefeaturetype()  : OGCResponse
process_getcapabilities()  : OGCResponse
Perform an OGC GetCapabilities Request.
process_getfeature()  : OGCResponse
request()  : OGCResponse
Request QGIS Server.
serviceException()  : OGCResponse
Provide an OGC Service Exception result.
validateExpressionFilter()  : bool
Validate an expression filter.
validateFilter()  : false|string
Parses and validate a filter for postgresql.
setGeojsonSql()  : string

Properties

$blockSqlWords

protected mixed $blockSqlWords = array(';', 'select', 'delete', 'insert', 'update', 'drop', 'alter', '--', 'truncate', 'vacuum', 'create')

$datasource

protected null|object $datasource

datasource parameters

$editingContext

protected bool $editingContext = false

apply edition context for request

$params

protected array<string|int, mixed> $params

$selectFields

protected mixed $selectFields = array()

$tplExceptions

protected string $tplExceptions = 'lizmap~wfs_exception'

selector of a template

$wfs_typename

protected null|string $wfs_typename

the requested typename

Methods

__construct()

constructor.

public __construct(Project $project, array<string|int, mixed> $params, lizmapServices $services[, null|string $requestXml = null ]) : mixed
Parameters
$project : Project

the project

$params : array<string|int, mixed>

the params array

$services : lizmapServices
$requestXml : null|string = null

the params array

getEditingContext()

public getEditingContext() : bool
Return values
bool

The edition context for request

param()

Get the value of a request parameter. If not defined, gets its default value.

public param(string $name[, mixed $defaultValue = null ][, bool $useDefaultIfEmpty = false ]) : mixed
Parameters
$name : string

the name of the request parameter

$defaultValue : mixed = null

the default returned value if the parameter doesn't exists

$useDefaultIfEmpty : bool = false

true: says to return the default value if the parameter value is ""

Return values
mixed

the request parameter value

parameters()

Provide the parameters with the lizmap extra parameters for filtering the request.

public parameters() : array<string|int, mixed>

Lizmap_User, Lizmap_User_Groups, Lizmap_Override_Filter have been added to the OGC request parameters.

Return values
array<string|int, mixed>

the OGC request parameters with Lizmap extra parameters for filtering request

process()

Process the OGC Request Checks the request parameter and performs the right method.

public process() : object
Return values
object

The request result with HTTP code, response mime-type, response data (properties $code, $mime, $data, $cached)

requestedTypename()

Get the requested typename based on TYPENAME or FEATUREID parameter.

public requestedTypename() : string
Return values
string

the requested typename

setEditingContext()

Set the edition context for request.

public setEditingContext(bool $editingContext) : bool
Parameters
$editingContext : bool

The edition context for request

Return values
bool

The edition context for request

buildQueryBase()

protected buildQueryBase(mixed $cnx, mixed $params, mixed $wfsFields) : mixed
Parameters
$cnx : mixed
$params : mixed
$wfsFields : mixed

constructUrl()

Build the URL to request QGIS Server.

protected constructUrl() : string
Return values
string

The URL to use to request QGIS Server

getBboxSql()

Get the SQL clause to instersects bbox in the request parameters.

protected getBboxSql(array<string, string> $params) : string
Parameters
$params : array<string, string>

the request parameters

Return values
string

the SQL clause to instersects bbox in the request parameters or empty string

getFeatureIdFilterExp()

protected getFeatureIdFilterExp(string $featureid, string $typename, qgisVectorLayer $qgisLayer) : string
Parameters
$featureid : string

The FEATUREID parameter

$typename : string

The layer's typename from TYPENAME or FEATUREID parameter

$qgisLayer : qgisVectorLayer

The QGIS layer based on typename

Return values
string

The QGIS expression based on FEATUREID parameter

getQueryOrder()

protected getQueryOrder(mixed $cnx, mixed $params, mixed $wfsFields) : mixed
Parameters
$cnx : mixed
$params : mixed
$wfsFields : mixed

loadXmlString()

protected loadXmlString(mixed $xmldata, mixed $name) : mixed
Parameters
$xmldata : mixed
$name : mixed

parseExpFilter()

protected parseExpFilter(mixed $cnx, mixed $params) : mixed
Parameters
$cnx : mixed
$params : mixed

parseFeatureId()

protected parseFeatureId(mixed $cnx, mixed $params) : mixed
Parameters
$cnx : mixed
$params : mixed

request()

Request QGIS Server.

protected request([bool $post = false ][, bool $stream = false ]) : OGCResponse
Parameters
$post : bool = false

Force to use POST request

$stream : bool = false

Get data as stream

Return values
OGCResponse

The request result with HTTP code, response mime-type and response data (properties $code, $mime, $data)

serviceException()

Provide an OGC Service Exception result.

protected serviceException([int $code = 400 ]) : OGCResponse
Parameters
$code : int = 400

The HTTP code to return

Return values
OGCResponse

The request result with HTTP code, response mime-type, response data (properties $code, $mime, $data, $cached)

validateExpressionFilter()

Validate an expression filter.

protected validateExpressionFilter(string $filter) : bool
Parameters
$filter : string

The expression filter to validate

Return values
bool

returns if the expression does not contains dangerous chars

validateFilter()

Parses and validate a filter for postgresql.

protected validateFilter(string $filter) : false|string
Parameters
$filter : string

The filter to parse

Return values
false|string

returns the validate filter if the expression does not contains dangerous chars

setGeojsonSql()

private setGeojsonSql(string $sql, jDbConnection $cnx, mixed $typename, mixed $geometryname) : string
Parameters
$sql : string
$cnx : jDbConnection
$typename : mixed
$geometryname : mixed
Return values
string

        
On this page

Search results