Documentation

MetadataSpreadsheetTrait

Description of MetadataSpreadsheetTrait

Tags
author

zozlak

Table of Contents

Properties

$horizontal  : bool
$valueMaps  : array<string, array<string, NamedNode>>
Stores value maps for cells with list-controlled values.

Methods

getPropertyLang()  : array<string|int, string>
getValue()  : NamedNode|Literal|null
mapReferenceCells()  : void
mapReferenceCols()  : void
mapReferenceRows()  : void

Properties

$valueMaps

Stores value maps for cells with list-controlled values.

private array<string, array<string, NamedNode>> $valueMaps

Needs to be recomputed with mapReferenceCols() every time you change the sheet.

Methods

getPropertyLang()

private getPropertyLang(string $value, string $defaultLang) : array<string|int, string>
Parameters
$value : string
$defaultLang : string
Return values
array<string|int, string>

getValue()

private getValue(Cell $cell, PropertyDesc $propDesc, string|null $defaultLang) : NamedNode|Literal|null
Parameters
$cell : Cell
$propDesc : PropertyDesc
$defaultLang : string|null
Return values
NamedNode|Literal|null

mapReferenceCells()

private mapReferenceCells(Spreadsheet $worksheet, DataValidation $validation, string $mapName) : void
Parameters
$worksheet : Spreadsheet
$validation : DataValidation
$mapName : string

mapReferenceRows()

private mapReferenceRows(Worksheet $sheet, array<string, PropertyMapping$propertyMap, string $valueColumn) : void
Parameters
$sheet : Worksheet
$propertyMap : array<string, PropertyMapping>
$valueColumn : string

        
On this page

Search results