lizmapRepository
in package
Tags
Table of Contents
Properties
- $properties : mixed
- services properties.
- $propertiesOptions : mixed
- services properties options.
- $repo : Repository
Methods
- __construct() : mixed
- lizmapRepository Constructor Do not call it, if you want to instanciate a lizmapRepository, you should do it with the lizmapServices::getLizmapRepository method.
- allowUserDefinedThemes() : mixed
- getACAOHeaderValue() : string
- Return the value of the Access-Control-Allow-Origin HTTP header.
- getData() : mixed
- getKey() : mixed
- getLabel() : mixed
- getOriginalPath() : mixed
- getPath() : mixed
- getProject() : null|Project
- Get a project by key.
- getProjects() : array<string|int, Project>
- Get the repository projects.
- getProjectsMetadata() : array<string|int, ProjectMetadata>
- Get the repository projects metadata.
- getProperties() : mixed
- getPropertiesOptions() : mixed
- getRepoProperties() : mixed
- hasValidPath() : mixed
- update() : bool
- Update a repository in a \Jelix\IniFile\IniModifier object.
Properties
$properties
services properties.
public
static mixed
$properties
= array('label', 'path', 'allowUserDefinedThemes', 'accessControlAllowOrigin')
Tags
$propertiesOptions
services properties options.
public
static mixed
$propertiesOptions
= array('path' => array('fieldType' => 'text', 'required' => \true), 'label' => array('fieldType' => 'text', 'required' => \true), 'allowUserDefinedThemes' => array('fieldType' => 'checkbox', 'required' => \false), 'accessControlAllowOrigin' => array('fieldType' => 'text', 'required' => \false))
Tags
$repo
protected
Repository
$repo
The repository instance
Methods
__construct()
lizmapRepository Constructor Do not call it, if you want to instanciate a lizmapRepository, you should do it with the lizmapServices::getLizmapRepository method.
public
__construct(string $key, array<string|int, mixed> $data, string $varPath, mixed $context, mixed $services) : mixed
Parameters
- $key : string
-
the name of the repository
- $data : array<string|int, mixed>
-
the repository data
- $varPath : string
-
the configuration files folder path
- $context : mixed
- $services : mixed
allowUserDefinedThemes()
public
allowUserDefinedThemes() : mixed
getACAOHeaderValue()
Return the value of the Access-Control-Allow-Origin HTTP header.
public
getACAOHeaderValue(mixed $referer) : string
Parameters
- $referer : mixed
Return values
string —the value of the ACAO header. If empty, the header should not be set.
getData()
public
getData(mixed $key) : mixed
Parameters
- $key : mixed
getKey()
public
getKey() : mixed
getLabel()
public
getLabel() : mixed
getOriginalPath()
public
getOriginalPath() : mixed
getPath()
public
getPath() : mixed
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 projectInstances
Return values
null|Project —null if it does not exist
getProjects()
Get the repository projects.
public
getProjects() : array<string|int, Project>
Return values
array<string|int, Project>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
getPropertiesOptions() : mixed
getRepoProperties()
public
static getRepoProperties() : mixed
hasValidPath()
public
hasValidPath() : mixed
update()
Update a repository in a \Jelix\IniFile\IniModifier object.
public
update(array<string|int, mixed> $data, IniModifier $ini) : bool
Parameters
- $data : array<string|int, mixed>
-
the repository data
- $ini : IniModifier
-
the object to edit the ini file
Return values
bool —true if there is at least one valid data in $data