Lizmap Web Client Master

QgisProject
in package

Tags
phpstan-type

MapLayerDef array{ type: string, id: string, name: string, shortname: string, title: string, abstract: string, proj4: string, srid: int, authid: int, datasource: string, provider: string, keywords: array, qgsmtime?: int, file?: string, embedded?: int, projectPath?: string }

phpstan-type

VectorLayerDef array{ type: string, id: string, name: string, shortname: string, title: string, abstract: string, proj4: string, srid: int, authid: int, datasource: string, provider: string, keywords: array, fields: array, aliases: array, defaults: array, constraints: array, wfsFields: array, webDavFields: array, webDavBaseUris: array, qgsmtime?: int, file?: string, embedded?: int, projectPath?: string }

Table of Contents

Constants

MAP_ONLY_VALUES  = 2
MAP_VALUES_AS_KEYS  = 1
MAP_VALUES_AS_VALUES  = 0

Properties

$allProj4  : array<string, string>
$appContext  : AppContextInterface
$cachedProperties  : array<string|int, mixed>
$canvasColor  : string
$customProjectVariables  : array<string|int, mixed>
$data  : array<string|int, mixed>
$lastSaveDateTime  : string
Last saved date time in the QGIS file.
$layers  : array<string|int, array<string|int, mixed>>
$optionTypes  : mixed
$path  : string
$qgisEmbeddedProjects  : array<string|int, mixed>
$qgisProjectVersion  : int
Version of QGIS which wrote the project.
$relations  : array<string, array<string|int, mixed>>
$relationsFields  : array<string|int, mixed>
$services  : lizmapServices
$themes  : array<string, array<string|int, mixed>>
$useLayerIDs  : bool
$WMSInformation  : array<string, mixed>
$xml  : SimpleXMLElement

Methods

__construct()  : mixed
constructor.
findLayersByKeyword()  : array<string|int, qgisMapLayer>|array<string|int, qgisVectorLayer>
getAbstract()  : string
Get the project abstract.
getAllProj4()  : array<string, string>
All proj4.
getCacheData()  : mixed
getCanvasColor()  : mixed
getCustomProjectVariables()  : mixed
getData()  : null|mixed
getEmbeddedQgisProject()  : null|QgisProject
getKeywordList()  : array<string|int, mixed>
List of keywords.
getLastSaveDateTime()  : string
Last saved date time in the QGIS file.
getLayer()  : null|qgisMapLayer|qgisVectorLayer
getLayerByKeyword()  : null|qgisMapLayer|qgisVectorLayer
getLayerDefinition()  : null|MapLayerDef|VectorLayerDef
getLayerNameByIdFromConfig()  : null|string
getPrintTemplates()  : array<string|int, mixed>
getProj4()  : null|string
Proj4 string for proj Auth Id if is known by the project.
getQgisProjectVersion()  : mixed
getRelationField()  : mixed
getRelations()  : array<string, array<string|int, mixed>>
Relations.
getThemes()  : array<string, array<string|int, mixed>>
Themes of the QGIS project.
getTitle()  : string
Get the project title.
getWMSInformation()  : array<string, mixed>
WMS informations.
getWMSMaxHeight()  : int
WMS Max Height.
getWMSMaxWidth()  : int
WMS Max Width.
getXmlLayer()  : array<string|int, SimpleXMLElement>
isUsingLayerIDs()  : bool
readAttributeLayers()  : mixed
readEditionForms()  : mixed
readEditionLayers()  : mixed
readFormControls()  : array<string|int, mixed>
readLayersLabeledFieldsConfig()  : mixed
Read the layer QGIS form configuration for the layers used in attribute tables, form filter & dataviz, and get the configuration for the fields for which to display labels instead of codes.
readLayersOrder()  : array<string|int, int>
readLocateByLayer()  : mixed
setPropertiesAfterRead()  : mixed
xpathQuery()  : array<string|int, mixed>
Execute an xpath Query on the XML content and return the result.
convertQgisProjectVersion()  : int
convertTypeOptions()  : mixed
convertValueOptions()  : bool|float|int|string
getEditType()  : array<string|int, QgisFormControlProperties>
getFieldConfiguration()  : array<string|int, QgisFormControlProperties>
getFieldConfigurationOptions()  : mixed
getMarkup()  : string
getValuesFromOptions()  : array<string|int, mixed>
getXml()  : SimpleXMLElement
temporary function to read xml for some methods that relies on xml data that are not yet stored in the cache.
getXmlLayer2()  : null|SimpleXMLElement
readUploadOptions()  : mixed
readWebDavStorageOptions()  : mixed
update the upload options with the property 'webDAVStorageUrl'.
readXmlProject()  : mixed
Read the qgis files.
setLayerGroupData()  : mixed
Set layers' group infos.
setLayerOpacity()  : mixed
Set layers' opacity with XML data.
setLayerShowFeatureCount()  : mixed
Set layers' last infos.
setShortNames()  : mixed
Set layers' shortname with XML data.
unsetPropAfterRead()  : mixed
Set/Unset some properties after reading the config file.

Constants

MAP_VALUES_AS_KEYS

public mixed MAP_VALUES_AS_KEYS = 1

MAP_VALUES_AS_VALUES

public mixed MAP_VALUES_AS_VALUES = 0

Properties

$allProj4

protected array<string, string> $allProj4 = array()

authid => proj4

$cachedProperties

protected static array<string|int, mixed> $cachedProperties = array('WMSInformation', 'canvasColor', 'allProj4', 'relations', 'relationsFields', 'themes', 'useLayerIDs', 'layers', 'data', 'qgisProjectVersion', 'lastSaveDateTime', 'customProjectVariables')

List of cached properties

$customProjectVariables

protected array<string|int, mixed> $customProjectVariables = array()

list of custom project variables defined by user in project

$data

protected array<string|int, mixed> $data = array()

QGIS project data

$lastSaveDateTime

Last saved date time in the QGIS file.

protected string $lastSaveDateTime

the last saved date contained in the QGS file

$layers

protected array<string|int, array<string|int, mixed>> $layers = array()

list of layers. Each item is a list of layer properties

$optionTypes

protected static mixed $optionTypes = array('Min' => 'f', 'Max' => 'f', 'Step' => 'i', 'Precision' => 'i', 'AllowMulti' => 'b', 'AllowNull' => 'b', 'UseCompleter' => 'b', 'DocumentViewer' => 'b', 'fieldEditable' => 'b', 'editable' => 'b', 'Editable' => 'b', 'notNull' => 'b', 'MapIdentification' => 'b', 'IsMultiline' => 'b', 'UseHtml' => 'b', 'field_iso_format' => 'b')

$qgisEmbeddedProjects

protected array<string|int, mixed> $qgisEmbeddedProjects = array()

List of embedded projects

$qgisProjectVersion

Version of QGIS which wrote the project.

protected int $qgisProjectVersion

$relations

protected array<string, array<string|int, mixed>> $relations = array()

for each referenced layer, there is an item with referencingLayer, referencedField, referencingField keys. There is also a 'pivot' key

$relationsFields

protected array<string|int, mixed> $relationsFields = array()

list of fields properties for each relation

$themes

protected array<string, array<string|int, mixed>> $themes = array()

list of themes

$WMSInformation

protected array<string, mixed> $WMSInformation

contains WMS info

$xml

protected SimpleXMLElement $xml

QGIS project XML

Methods

getAbstract()

Get the project abstract.

public getAbstract() : string
Return values
string

the project abstract

getAllProj4()

All proj4.

public getAllProj4() : array<string, string>
Return values
array<string, string>

getCustomProjectVariables()

public getCustomProjectVariables() : mixed

getData()

public getData(string $key) : null|mixed
Parameters
$key : string
Return values
null|mixed

getKeywordList()

List of keywords.

public getKeywordList() : array<string|int, mixed>
Return values
array<string|int, mixed>

getLastSaveDateTime()

Last saved date time in the QGIS file.

public getLastSaveDateTime() : string
Return values
string

the last saved date contained in the QGS file

getLayerDefinition()

public getLayerDefinition(string $layerId) : null|MapLayerDef|VectorLayerDef
Parameters
$layerId : string
Return values
null|MapLayerDef|VectorLayerDef

getLayerNameByIdFromConfig()

public getLayerNameByIdFromConfig(string $layerId, object $layers) : null|string
Parameters
$layerId : string
$layers : object
Return values
null|string

getPrintTemplates()

public getPrintTemplates() : array<string|int, mixed>
Return values
array<string|int, mixed>

getProj4()

Proj4 string for proj Auth Id if is known by the project.

public getProj4(string $authId) : null|string
Parameters
$authId : string
Return values
null|string

getQgisProjectVersion()

public getQgisProjectVersion() : mixed

getRelationField()

public getRelationField(mixed $relationId) : mixed
Parameters
$relationId : mixed

getRelations()

Relations.

public getRelations() : array<string, array<string|int, mixed>>
Return values
array<string, array<string|int, mixed>>

getThemes()

Themes of the QGIS project.

public getThemes() : array<string, array<string|int, mixed>>
Return values
array<string, array<string|int, mixed>>

getTitle()

Get the project title.

public getTitle() : string
Return values
string

the project title

getWMSInformation()

WMS informations.

public getWMSInformation() : array<string, mixed>
Return values
array<string, mixed>

getWMSMaxHeight()

WMS Max Height.

public getWMSMaxHeight() : int
Return values
int

getWMSMaxWidth()

WMS Max Width.

public getWMSMaxWidth() : int
Return values
int

getXmlLayer()

public getXmlLayer(mixed $layerId) : array<string|int, SimpleXMLElement>
Parameters
$layerId : mixed
Tags
FIXME:

remove this method. Be sure it is not used in other projects. Data provided by the returned xml element should be extracted and encapsulated into an object. Xml should not be used by callers

Return values
array<string|int, SimpleXMLElement>

isUsingLayerIDs()

public isUsingLayerIDs() : bool
Return values
bool

readAttributeLayers()

public readAttributeLayers(object $attributeLayers) : mixed
Parameters
$attributeLayers : object

readEditionForms()

public readEditionForms(object $editionLayers[, null|Project $proj = null ]) : mixed
Parameters
$editionLayers : object
$proj : null|Project = null

readEditionLayers()

public readEditionLayers(object $editionLayers) : mixed
Parameters
$editionLayers : object

readFormControls()

public readFormControls(SimpleXMLElement $layerXml, string $layerId, Project $proj) : array<string|int, mixed>

No longer used by internal code and not recommended.

Parameters
$layerXml : SimpleXMLElement
$layerId : string
$proj : Project
Return values
array<string|int, mixed>

readLayersLabeledFieldsConfig()

Read the layer QGIS form configuration for the layers used in attribute tables, form filter & dataviz, and get the configuration for the fields for which to display labels instead of codes.

public readLayersLabeledFieldsConfig(array<string|int, mixed> $layerIds[, null|Project $proj = null ]) : mixed

This concerns fields with ValueMap, ValueRelation & RelationReference config

Parameters
$layerIds : array<string|int, mixed>

List of layer identifiers

$proj : null|Project = null

readLayersOrder()

public readLayersOrder(mixed $layers) : array<string|int, int>
Parameters
$layers : mixed
Return values
array<string|int, int>

readLocateByLayer()

public readLocateByLayer(object $locateByLayer) : mixed
Parameters
$locateByLayer : object

xpathQuery()

Execute an xpath Query on the XML content and return the result.

public xpathQuery(string $query) : array<string|int, mixed>
Parameters
$query : string

The query to execute

Return values
array<string|int, mixed>

convertQgisProjectVersion()

protected convertQgisProjectVersion(string $version) : int
Parameters
$version : string
Return values
int

convertTypeOptions()

protected convertTypeOptions(mixed &$options) : mixed
Parameters
$options : mixed

convertValueOptions()

protected convertValueOptions(string $value, string $type) : bool|float|int|string

No longer used by internal code and not recommended.

Parameters
$value : string

the option value attribute content

$type : string

the option type attribute content

Return values
bool|float|int|string

getFieldConfigurationOptions()

protected getFieldConfigurationOptions(SimpleXMLElement $options) : mixed

No longer used by internal code and not recommended.

Parameters
$options : SimpleXMLElement

getMarkup()

protected getMarkup(int|string $fieldEditType, array<string|int, mixed> $editAttributes) : string

No longer used by internal code and not recommended.

Parameters
$fieldEditType : int|string
$editAttributes : array<string|int, mixed>

attributes of widgetv2config

Return values
string

getValuesFromOptions()

protected getValuesFromOptions(SimpleXMLElement $optionList[, int $valuesExtraction = 0 ]) : array<string|int, mixed>

No longer used by internal code and not recommended.

Parameters
$optionList : SimpleXMLElement
$valuesExtraction : int = 0

one of MAP_* const

Return values
array<string|int, mixed>

getXml()

temporary function to read xml for some methods that relies on xml data that are not yet stored in the cache.

protected getXml() : SimpleXMLElement
Return values
SimpleXMLElement

getXmlLayer2()

protected getXmlLayer2(SimpleXMLElement $xml, string $layerId) : null|SimpleXMLElement
Parameters
$xml : SimpleXMLElement
$layerId : string
Return values
null|SimpleXMLElement

readUploadOptions()

protected readUploadOptions(string $fieldEditType, array<string|int, mixed> &$fieldEditOptions) : mixed

No longer used by internal code and not recommended.

Parameters
$fieldEditType : string

Field edit type

$fieldEditOptions : array<string|int, mixed>

Field edit config options

readWebDavStorageOptions()

update the upload options with the property 'webDAVStorageUrl'.

protected readWebDavStorageOptions(array<string|int, mixed> &$fieldEditOptions) : mixed

No longer used by internal code and not recommended.

Parameters
$fieldEditOptions : array<string|int, mixed>

readXmlProject()

Read the qgis files.

protected readXmlProject(mixed $qgs_path) : mixed
Parameters
$qgs_path : mixed

        
On this page

Search results