Lizmap Web Client Master

ProjectInfo extends BaseQgisXmlObject
in package

QGIS Project info class.

Table of Contents

Properties

$layerTreeRoot  : LayerTreeRoot
$Layouts  : array<string|int, Layout>
$projectCrs  : SpatialRefSys
$projectlayers  : array<string|int, EmbeddedLayer|MapLayer>
$projectname  : string
$properties  : ProjectProperties
$relations  : array<string|int, ProjectRelation>
$saveDateTime  : null|string
$title  : string
$version  : string
$visibilityPresets  : array<string|int, ProjectVisibilityPreset>
$childParsers  : mixed
$children  : array<string|int, string>
$childrenCollection  : array<string, string>
$defaultValues  : array<string|int, mixed>
$instances  : array<string|int, ProjectInfo>
$mandatoryChildren  : array<string|int, string>
$mandatoryProperties  : mixed
$path  : string
$properties  : mixed
$qgisLocalName  : string
$data  : array<string|int, mixed>

Methods

__construct()  : mixed
Base QGIS object constructor.
__get()  : mixed
__isset()  : bool
__set()  : void
__unset()  : void
fromQgisPath()  : ProjectInfo
Get a QGIS Project info instance from a QGIS Project path.
fromXmlReader()  : BaseQgisObject
Get an QGIS object instance from an XMLReader instance at an element.
getData()  : array<string|int, mixed>
getLayerById()  : null|MapLayer|RasterLayer|VectorLayer
Get layer by Id.
getLayersAsKeyArray()  : array<string|int, mixed>
Get layers as key array.
getLayoutsAsKeyArray()  : array<string|int, mixed>
Get layouts as key array.
getPath()  : null|string
Get the project path if it has been created with ProjectInfo::fromQgisPath.
getProjAsKeyArray()  : array<string, string>
Get proj as key array.
getQgisPath()  : null|string
Get the QGIS project path if it has been created with ProjectInfo::fromQgisPath.
getRelationFieldsAsKeyArray()  : array<string|int, mixed>
Get relations as key array.
getRelationsAsKeyArray()  : array<string, array<string|int, mixed>>
Get relations as key array.
getVisibilityPresetsAsKeyArray()  : array<string, array<string|int, mixed>>
Get the visibility presets as key array.
getWmsInformationsAsKeyArray()  : array<string, mixed>
Get the vWMS informations as key array.
jsonSerialize()  : mixed
registerChildParser()  : mixed
unRegisterChildParser()  : mixed
arrayToData()  : array<string|int, mixed>
buildInstance()  : ProjectInfo
Build an instance with data as an array.
getAttributes()  : array{'version': string, 'projectname': string}
Get attributes from an XMLReader instance at an element.
parseChild()  : mixed
Parse from an XMLReader instance at a child of an element.
set()  : void

Properties

$childParsers

protected static mixed $childParsers = array()

$children

protected static array<string|int, string> $children = array('title', 'projectCrs', 'properties')

The XML element parsed children

$childrenCollection

protected static array<string, string> $childrenCollection = array()

The XML element tagname associated with a collector property name

$defaultValues

protected array<string|int, mixed> $defaultValues = array('visibilityPresets' => array(), 'relations' => array(), 'projectlayers' => array(), 'Layouts' => array())

The default values for properties

$instances

protected static array<string|int, ProjectInfo> $instances = array()

The instances created with ProjectInfo::fromQgisPath

$mandatoryChildren

protected static array<string|int, string> $mandatoryChildren = array('title', 'projectCrs', 'properties')

The XML element needed children

$mandatoryProperties

protected mixed $mandatoryProperties = array('version', 'projectname', 'title', 'projectCrs', 'properties', 'layerTreeRoot', 'visibilityPresets', 'relations', 'projectlayers', 'Layouts')

$properties

protected mixed $properties = array('version', 'projectname', 'saveDateTime', 'title', 'projectCrs', 'properties', 'layerTreeRoot', 'visibilityPresets', 'relations', 'projectlayers', 'Layouts')

$qgisLocalName

protected static string $qgisLocalName = 'qgis'

The XML element local name

$data

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

The instance data for properties

Methods

__construct()

Base QGIS object constructor.

public __construct(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>

the instance data

__get()

public __get(mixed $property) : mixed
Parameters
$property : mixed

__isset()

public __isset(mixed $property) : bool
Parameters
$property : mixed
Return values
bool

__set()

public final __set(string $key, mixed $val) : void
Parameters
$key : string
$val : mixed

__unset()

public final __unset(string $key) : void
Parameters
$key : string

fromQgisPath()

Get a QGIS Project info instance from a QGIS Project path.

public static fromQgisPath(string $qgisProjectPath) : ProjectInfo
Parameters
$qgisProjectPath : string

A QGIS Project path

Return values
ProjectInfo

the QGIS project info instance corresponding to the path

fromXmlReader()

Get an QGIS object instance from an XMLReader instance at an element.

public static fromXmlReader(XMLReader $oXmlReader) : BaseQgisObject
Parameters
$oXmlReader : XMLReader

An XMLReader instance at an element

Return values
BaseQgisObject

the QGIS object instance corresponding to the element

getData()

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

getLayersAsKeyArray()

Get layers as key array.

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

getLayoutsAsKeyArray()

Get layouts as key array.

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

getPath()

Get the project path if it has been created with ProjectInfo::fromQgisPath.

public getPath() : null|string
Return values
null|string

getProjAsKeyArray()

Get proj as key array.

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

getQgisPath()

Get the QGIS project path if it has been created with ProjectInfo::fromQgisPath.

public static getQgisPath(ProjectInfo $qgisProject) : null|string
Parameters
$qgisProject : ProjectInfo

A QGIS Project info created with ProjectInfo::fromQgisPath

Return values
null|string

getRelationFieldsAsKeyArray()

Get relations as key array.

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

getRelationsAsKeyArray()

Get relations as key array.

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

getVisibilityPresetsAsKeyArray()

Get the visibility presets as key array.

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

getWmsInformationsAsKeyArray()

Get the vWMS informations as key array.

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

registerChildParser()

public static registerChildParser(mixed $localName, mixed $parser) : mixed
Parameters
$localName : mixed
$parser : mixed

unRegisterChildParser()

public static unRegisterChildParser(mixed $localName, mixed $parser) : mixed
Parameters
$localName : mixed
$parser : mixed

arrayToData()

protected arrayToData(mixed $vArray) : array<string|int, mixed>
Parameters
$vArray : mixed
Return values
array<string|int, mixed>

buildInstance()

Build an instance with data as an array.

protected static buildInstance(array<string|int, mixed> $data) : ProjectInfo
Parameters
$data : array<string|int, mixed>

the instance data

Return values
ProjectInfo

the instance

getAttributes()

Get attributes from an XMLReader instance at an element.

protected static getAttributes(XMLReader $oXmlReader) : array{'version': string, 'projectname': string}
Parameters
$oXmlReader : XMLReader

An XMLReader instance at an element

Return values
array{'version': string, 'projectname': string}

the element attributes as keys / values

parseChild()

Parse from an XMLReader instance at a child of an element.

protected static parseChild(XMLReader $oXmlReader) : mixed
Parameters
$oXmlReader : XMLReader

An XMLReader instance at a child of an element

Return values
mixed

the result of the parsing

set()

protected set(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

        
On this page

Search results