Lizmap Web Client 3.11.0

Repository
in package

Table of Contents

Properties

$appContext  : AppContextInterface
$cleanedPath  : null|string
$projectInstances  : array<string, Project>
$services  : lizmapServices
$data  : array<string|int, mixed>
Lizmap repository configuration data.
$key  : string
Lizmap repository key.
$properties  : array<string|int, string>
Repository properties.
$propertiesOptions  : array<string, array<string, bool|string>>
Repository properties options.
$varPath  : string
The configuration files folder path.

Methods

__construct()  : mixed
lizmapRepository Constructor.
allowUserDefinedThemes()  : bool
Indicate if user defined themes are allowed.
checkRefererEmbededIframe()  : bool
Check if the referer is allowed to embed iframe.
getACAOHeaderValue()  : string
Return the value of the Access-Control-Allow-Origin HTTP header.
getData()  : null|mixed
getKey()  : string
getLabel()  : string
Get the repository label.
getOriginalPath()  : string
Get the original path.
getPath()  : false|string
getProject()  : null|Project
Get a project by key.
getProjects()  : array<string|int, Project>
Get the repository projects instances.
getProjectsMainData()  : array<string|int, ProjectMainData>
Get the repository projects main data.
getProjectsMetadata()  : array<string|int, ProjectMetadata>
Get the repository projects metadata.
getProperties()  : array<string|int, string>
Get the list of properties of a repository.
getPropertiesOptions()  : array<string, array{fieldType: string, required: bool}>
Get theR repository properties options.
getRepoProperties()  : array<string, array{fieldType: string, required: bool}>
Get theR repository properties options.
hasValidPath()  : bool
Check if the repository has a valid path.
update()  : bool
Update a repository in a ini content.

Properties

$cleanedPath

protected null|string $cleanedPath

the cleaned path of the repository, with a trailing slash

$projectInstances

protected array<string, Project> $projectInstances = array()

list of projects instances. keys are projects names

$data

Lizmap repository configuration data.

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

$key

Lizmap repository key.

private string $key = ''

$properties

Repository properties.

private static array<string|int, string> $properties = array('label', 'path', 'allowUserDefinedThemes', 'accessControlAllowOrigin', 'iframeEmbedAllowOrigin')

$propertiesOptions

Repository properties options.

private static array<string, array<string, bool|string>> $propertiesOptions = array('label' => array('fieldType' => 'text', 'required' => true), 'path' => array('fieldType' => 'text', 'required' => true), 'allowUserDefinedThemes' => array('fieldType' => 'checkbox', 'required' => false), 'accessControlAllowOrigin' => array('fieldType' => 'text', 'required' => false), 'iframeEmbedAllowOrigin' => array('fieldType' => 'text', 'required' => false))
Tags
phpstan-var

array<string, array{fieldType: string, required: bool}>

$varPath

The configuration files folder path.

private string $varPath = ''

Methods

__construct()

lizmapRepository Constructor.

public __construct(string $key, array<string|int, mixed> $data, string $varPath, lizmapServices $services, AppContextInterface $appContext) : mixed

Do not call it directly. Prefer to call lizmapServices::getLizmapRepository() instead.

Parameters
$key : string

the name of the repository

$data : array<string|int, mixed>

the repository data

$varPath : string

the configuration files folder path

$services : lizmapServices
$appContext : AppContextInterface

allowUserDefinedThemes()

Indicate if user defined themes are allowed.

public allowUserDefinedThemes() : bool
Return values
bool

true if it is allowed

checkRefererEmbededIframe()

Check if the referer is allowed to embed iframe.

public checkRefererEmbededIframe(mixed $referer) : bool
Parameters
$referer : mixed

The referer

Return values
bool

is the referer allowed to embed iframe

getACAOHeaderValue()

Return the value of the Access-Control-Allow-Origin HTTP header.

public getACAOHeaderValue(mixed $referer) : string
Parameters
$referer : mixed

The referer

Return values
string

the value of the ACAO header. If empty, the header should not be set.

getData()

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

getKey()

public getKey() : string
Return values
string

the technical name of the repository

getLabel()

Get the repository label.

public getLabel() : string
Return values
string

the repository label

getOriginalPath()

Get the original path.

public getOriginalPath() : string
Return values
string

getPath()

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

the path of the repository

getProject()

Get a project by key.

public getProject(string $key[, bool $keepReference = true ]) : null|Project
Parameters
$key : string

the project key

$keepReference : bool = true

if we need to keep reference in the repository property projectInstances

Tags
throws
UnknownLizmapProjectException

if the project does not exist

Return values
null|Project

null if it does not exist

getProjects()

Get the repository projects instances.

public getProjects() : array<string|int, Project>
Return values
array<string|int, Project>

getProjectsMetadata()

Get the repository projects metadata.

public getProjectsMetadata([bool $checkAcl = true ]) : array<string|int, ProjectMetadata>
Parameters
$checkAcl : bool = true

If the ACL must be checked, according to the current user, default to true

Return values
array<string|int, ProjectMetadata>

getProperties()

Get the list of properties of a repository.

public static getProperties() : array<string|int, string>
Return values
array<string|int, string>

getPropertiesOptions()

Get theR repository properties options.

public static getPropertiesOptions() : array<string, array{fieldType: string, required: bool}>
Return values
array<string, array{fieldType: string, required: bool}>

getRepoProperties()

Get theR repository properties options.

public static getRepoProperties() : array<string, array{fieldType: string, required: bool}>
Tags
see
self::getPropertiesOptions()
Return values
array<string, array{fieldType: string, required: bool}>

hasValidPath()

Check if the repository has a valid path.

public hasValidPath() : bool
Return values
bool

update()

Update a repository in a ini content.

public update(array<string|int, mixed> $data, jIniFileModifier $ini) : bool
Parameters
$data : array<string|int, mixed>

the repository data

$ini : jIniFileModifier

the object to edit the ini file

Return values
bool

true if there is at least one valid data in $data


        
On this page

Search results