Lizmap Web Client 3.11.0

ActionQuery
in package

Table of Contents

Properties

$appContext  : AppContextInterface
$cnx  : jDbConnection
$layerId  : string
$project  : string
$repository  : string

Methods

__construct()  : mixed
buildParams()  : array<string, null|int|string>
Build the parameter array passed as a JSON object to lizmap_get_data.
buildSql()  : array{0: string, 1: list}
Build the SQL string and the ordered values list for the prepared statement.
execute()  : mixed
Execute the prepared statement inside a transaction and return the decoded data.

Properties

Methods

__construct()

public __construct(mixed $cnx, string $repository, string $project, string $layerId, AppContextInterface $appContext) : mixed
Parameters
$cnx : mixed
$repository : string
$project : string
$layerId : string
$appContext : AppContextInterface

buildParams()

Build the parameter array passed as a JSON object to lizmap_get_data.

public buildParams(string $actionName, string $scope, null|qgisVectorLayer $qgisLayer, int|string $featureId, string $wkt, string $mapCenter, string $mapExtent) : array<string, null|int|string>
Parameters
$actionName : string
$scope : string

project|layer|feature

$qgisLayer : null|qgisVectorLayer
$featureId : int|string
$wkt : string
$mapCenter : string
$mapExtent : string
Return values
array<string, null|int|string>

buildSql()

Build the SQL string and the ordered values list for the prepared statement.

public buildSql(array<string, null|int|string> $params, object $action, array<string, mixed> $clientOptions) : array{0: string, 1: list}
Parameters
$params : array<string, null|int|string>

Output of buildParams()

$action : object

Action config object (must expose ->options)

$clientOptions : array<string, mixed>

Options sent by the client

Return values
array{0: string, 1: list}

[$sql, $sqlValues]

execute()

Execute the prepared statement inside a transaction and return the decoded data.

public execute(string $sql, array<int, mixed> $sqlValues) : mixed
Parameters
$sql : string
$sqlValues : array<int, mixed>
Tags
throws
Exception

on query failure (after rollback + log)

Return values
mixed

Decoded JSON data returned by lizmap_get_data

On this page

Search results