MetadataGui
in package
Provides simple HTML serialization of a metadata triples set
Tags
Table of Contents
Constants
- CHILD_PROP = 'Child resources'
- TMPL = <<<TMPL <!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <title>%s</title> <style> body {font-family: monospace;} .n {padding-left: 0rem; font-weight: normal;} .s {padding-left: 0rem; font-weight: bold;} .p {padding-left: 4rem; font-style: normal;} .o {padding-left: 8rem; font-style: normal;} .tl {font-style: italic;} .p > a {text-decoration: none; color: inherit;} </style> </head> <body> <h1>%s</h1> TMPL
- TYPE_ID = 'ID'
- TYPE_REL = 'REL'
- TYPE_URI = 'URI'
Properties
- $data : array<string, array<string, array<string|int, mixed>>>
- $nmsp : array<string, string>
- $properties : array<string, string>
- $res : int
- $stream : mixed
- $titles : array<string, string>
Methods
- __construct() : mixed
- output() : void
- formatObject() : string
- formatResource() : string
- outputProperty() : void
Constants
CHILD_PROP
public
mixed
CHILD_PROP
= 'Child resources'
TMPL
public
mixed
TMPL
= <<<TMPL
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>%s</title>
<style>
body {font-family: monospace;}
.n {padding-left: 0rem; font-weight: normal;}
.s {padding-left: 0rem; font-weight: bold;}
.p {padding-left: 4rem; font-style: normal;}
.o {padding-left: 8rem; font-style: normal;}
.tl {font-style: italic;}
.p > a {text-decoration: none; color: inherit;}
</style>
</head>
<body>
<h1>%s</h1>
TMPL
TYPE_ID
public
mixed
TYPE_ID
= 'ID'
TYPE_REL
public
mixed
TYPE_REL
= 'REL'
TYPE_URI
public
mixed
TYPE_URI
= 'URI'
Properties
$data
private
array<string, array<string, array<string|int, mixed>>>
$data
$nmsp
private
array<string, string>
$nmsp
$properties
private
array<string, string>
$properties
$res
private
int
$res
$stream
private
mixed
$stream
$titles
private
array<string, string>
$titles
Methods
__construct()
public
__construct(mixed $stream, PDOStatement $query, int $resId[, string $preferredLang = 'en' ]) : mixed
Parameters
- $stream : mixed
- $query : PDOStatement
- $resId : int
- $preferredLang : string = 'en'
output()
public
output() : void
formatObject()
private
formatObject(Triple $o, string $baseUrl) : string
Parameters
- $o : Triple
- $baseUrl : string
Return values
stringformatResource()
private
formatResource(string $res[, bool $tryTitles = true ]) : string
Parameters
- $res : string
- $tryTitles : bool = true
Return values
stringoutputProperty()
private
outputProperty(array<string|int, Triple> $values, string $p, string $baseUrl) : void
Parameters
- $values : array<string|int, Triple>
- $p : string
- $baseUrl : string