Documentation

Place extends Datum
in package

Place element

Tags
author

Davide Lanza davide.lanza@eikonproject.org

Table of Contents

Properties

$directory  : mixed

Methods

__construct()  : mixed
Construct an element with an associated directory
metadata()  : mixed
Return the metadata of the element
metadata_fields()  : array<string|int, mixed>
Return the metadata fields of the place.

Properties

Methods

__construct()

Construct an element with an associated directory

public __construct(string $directory) : mixed
Parameters
$directory : string

the path to the associated directory.

Tags
author

Davide Lanza davide.lanza@eikonproject.org

metadata()

Return the metadata of the element

public metadata() : mixed

Every element has a metadata.json file in the associated directory. This method loads and returns that JSON.

Tags
see
load_json()
author

Davide Lanza davide.lanza@eikonproject.org

Return values
mixed

The loaded json metadata file in appropriate PHP type.

metadata_fields()

Return the metadata fields of the place.

public metadata_fields() : array<string|int, mixed>

Every place metadata inherit all the metadata of the Datum plus:

  • city: city in which the place is
  • country_alpha_2: ISO 3166-1 alpha-2 code of the country in which the place is
Tags
author

Davide Lanza davide.lanza@eikonproject.org

Return values
array<string|int, mixed>

Names of the metadata fields of the element.


        
On this page

Search results