Repository
in package
Table of Contents
Properties
- $appContext : mixed
- $cleanedPath : mixed
- $projectInstances : array<string|int, Project>
- $services : mixed
- $data : mixed
- Lizmap repository configuration data.
- $key : mixed
- Lizmap repository key.
- $properties : mixed
- services properties.
- $propertiesOptions : mixed
- services properties options.
- $varPath : mixed
- The configuration files folder path.
Methods
- __construct() : mixed
- lizmapRepository Constructor.
- allowUserDefinedThemes() : bool
- Indicate if user defined themes are allowed.
- 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() : mixed
- 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() : mixed
- getPropertiesOptions() : mixed
- getRepoProperties() : mixed
- update() : bool
- Update a repository in a ini content.
Properties
$appContext
protected
mixed
$appContext
$cleanedPath
protected
mixed
$cleanedPath
$projectInstances
protected
array<string|int, Project>
$projectInstances
= array()
list of projects. keys are projects names
$services
protected
mixed
$services
$data
Lizmap repository configuration data.
private
mixed
$data
= array()
$key
Lizmap repository key.
private
mixed
$key
= ''
$properties
services properties.
private
static mixed
$properties
= array('label', 'path', 'allowUserDefinedThemes', 'accessControlAllowOrigin')
$propertiesOptions
services properties options.
private
static mixed
$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))
$varPath
The configuration files folder path.
private
mixed
$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
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|mixedgetKey()
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()
public
getOriginalPath() : mixed
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
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>getProjectsMainData()
Get the repository projects main data.
public
getProjectsMainData() : array<string|int, ProjectMainData>
Return values
array<string|int, ProjectMainData>getProjectsMetadata()
Get the repository projects metadata.
public
getProjectsMetadata() : array<string|int, ProjectMetadata>
Return values
array<string|int, ProjectMetadata>getProperties()
public
static getProperties() : mixed
getPropertiesOptions()
public
static getPropertiesOptions() : mixed
getRepoProperties()
public
getRepoProperties() : mixed
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