RootViewHelper
extends ArcheHelper
in package
Uses
ArcheUtilTrait
Description of RootViewHelper
Tags
Table of Contents
Properties
- $config : mixed
- $generalFunctions : mixed
- $repoDb : mixed
- $siteLang : mixed
- $prefixesToChange : mixed
- $propData : mixed
- $result : mixed
- $rootViewObjectArray : mixed
- $viewProperties : mixed
Methods
- __construct() : mixed
- createFullPropertyFromShortcut() : string
- createResourceObject() : array<string|int, mixed>
- createShortcut() : string
- Create shortcut from the property for the gui
- createView() : array<string|int, mixed>
- createViewApi() : array<string|int, mixed>
- getCount() : int
- Get the count from the rest api result
- processGraph() : array<string|int, mixed>
- Process the easyrdf graph data and create ResourceObject arrays
- extendActualObj() : mixed
- Extend the actual object with the shortcuts
- formatValuesToObject() : mixed
- Format the Db result to ResourceObject values
- makeInsideUri() : string
- Create gui inside uri from the identifier
- addTopCollectionProperty() : void
- createObj() : object
- Create the root object for gui
- fetchProperties() : void
- Fetch the property values and create the response object
- formatResultToGui() : mixed
- getDomainFromShortCut() : string
- getLiteralValues() : object
- getObjectValues() : array<string|int, mixed>
- getResourceRepoIdentifier() : string
- getUriValues() : object
- getValueFromShortCut() : string
- setAcdhId() : void
- setIDTypeAcdhId() : void
- setIDTypeRepoId() : void
- setIDTypeUri() : void
- setLanguage() : string
- setProperties() : mixed
- The properties what we need for this view
- setTitle() : void
- setUpRepoIdForExternalType() : void
- setUri() : void
- setViewProperties() : mixed
- Set the properties what we need for this view, we will fetch them from the results array
Properties
$config
protected
mixed
$config
$generalFunctions
protected
mixed
$generalFunctions
$repoDb
protected
mixed
$repoDb
$siteLang
protected
mixed
$siteLang
$prefixesToChange
private
static mixed
$prefixesToChange
= array("http://fedora.info/definitions/v4/repository#" => "fedora", "http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#" => "ebucore", "http://www.loc.gov/premis/rdf/v1#" => "premis", "http://www.jcp.org/jcr/nt/1.0#" => "nt", "http://www.w3.org/2000/01/rdf-schema#" => "rdfs", "http://www.w3.org/ns/ldp#" => "ldp", "http://www.iana.org/assignments/relation/" => "iana", "https://vocabs.acdh.oeaw.ac.at/schema#" => "acdh", "https://id.acdh.oeaw.ac.at/" => "acdhID", "http://purl.org/dc/elements/1.1/" => "dc", "http://purl.org/dc/terms/" => "dcterms", "http://www.w3.org/2002/07/owl#" => "owl", "http://xmlns.com/foaf/0.1/" => "foaf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#" => "rdf", "http://www.w3.org/2004/02/skos/core#" => "skos", "http://hdl.handle.net/21.11115/" => "handle")
$propData
private
mixed
$propData
= array()
$result
private
mixed
$result
= []
$rootViewObjectArray
private
mixed
$rootViewObjectArray
$viewProperties
private
mixed
$viewProperties
= []
Methods
__construct()
public
__construct([mixed $cfg = null ]) : mixed
Parameters
- $cfg : mixed = null
createFullPropertyFromShortcut()
public
static createFullPropertyFromShortcut(string $prop) : string
Parameters
- $prop : string
Return values
stringcreateResourceObject()
public
createResourceObject(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
Return values
array<string|int, mixed>createShortcut()
Create shortcut from the property for the gui
public
static createShortcut(string $prop) : string
Parameters
- $prop : string
Return values
stringcreateView()
public
createView([array<string|int, mixed> $data = array() ]) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed> = array()
Return values
array<string|int, mixed>createViewApi()
public
createViewApi(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
Return values
array<string|int, mixed>getCount()
Get the count from the rest api result
public
getCount(array<string|int, mixed> &$obj) : int
Parameters
- $obj : array<string|int, mixed>
Return values
intprocessGraph()
Process the easyrdf graph data and create ResourceObject arrays
public
processGraph(array<string|int, mixed> $obj) : array<string|int, mixed>
Parameters
- $obj : array<string|int, mixed>
Return values
array<string|int, mixed>extendActualObj()
Extend the actual object with the shortcuts
protected
extendActualObj([bool $root = false ]) : mixed
Parameters
- $root : bool = false
formatValuesToObject()
Format the Db result to ResourceObject values
protected
formatValuesToObject(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
makeInsideUri()
Create gui inside uri from the identifier
protected
makeInsideUri(string $data) : string
Parameters
- $data : string
Return values
stringaddTopCollectionProperty()
private
addTopCollectionProperty(string $lang, int $k, object &$v) : void
Parameters
- $lang : string
- $k : int
- $v : object
createObj()
Create the root object for gui
private
createObj(int $id, string $property, string $title, string $value) : object
Parameters
- $id : int
- $property : string
- $title : string
- $value : string
Return values
objectfetchProperties()
Fetch the property values and create the response object
private
fetchProperties(string $k, object $v, string $lang) : void
Parameters
- $k : string
- $v : object
- $lang : string
formatResultToGui()
private
formatResultToGui(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
getDomainFromShortCut()
private
static getDomainFromShortCut(string $prop) : string
Parameters
- $prop : string
Return values
stringgetLiteralValues()
private
getLiteralValues(array<string|int, mixed> $v) : object
Parameters
- $v : array<string|int, mixed>
Return values
objectgetObjectValues()
private
getObjectValues(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
Return values
array<string|int, mixed>getResourceRepoIdentifier()
private
getResourceRepoIdentifier(mixed $id) : string
Parameters
- $id : mixed
Return values
stringgetUriValues()
private
getUriValues(array<string|int, mixed> $v) : object
Parameters
- $v : array<string|int, mixed>
Return values
objectgetValueFromShortCut()
private
static getValueFromShortCut(string $prop) : string
Parameters
- $prop : string
Return values
stringsetAcdhId()
private
setAcdhId(object &$d) : void
Parameters
- $d : object
setIDTypeAcdhId()
private
setIDTypeAcdhId(object &$d) : void
Parameters
- $d : object
setIDTypeRepoId()
private
setIDTypeRepoId(object &$d) : void
Parameters
- $d : object
setIDTypeUri()
private
setIDTypeUri(object &$d) : void
Parameters
- $d : object
setLanguage()
private
setLanguage(object &$v) : string
Parameters
- $v : object
Return values
stringsetProperties()
The properties what we need for this view
private
setProperties() : mixed
setTitle()
private
setTitle(object &$d) : void
Parameters
- $d : object
setUpRepoIdForExternalType()
private
setUpRepoIdForExternalType(object &$d) : void
Parameters
- $d : object
setUri()
private
setUri(object &$d) : void
Parameters
- $d : object
setViewProperties()
Set the properties what we need for this view, we will fetch them from the results array
private
setViewProperties() : mixed