ClassDesc
extends BaseDesc
in package
A container for and RDF class description
Tags
Table of Contents
Properties
- $class : array<string|int, string>
- Class URIs
- $classes : array<string|int, string>
- Array of classes this class inherits from (including the class URI itself)
- $comment : array<string|int, string>
- Associative array of rdfs:comment values (langauge as a key)
- $id : int|null
- Internal id of a corresponding repository resource
- $label : array<string|int, string>
- Associative array of label values (langauge as a key)
- $properties : array<string, PropertyDesc>
- Associative array of class properties (property URIs as keys, if a property has many URIs, it will exist under all of them - use the `getProperties()` method to get a distinct list of properties).
- $uri : string|null
- The ontology entity URI within the ontology namespace
Methods
- __construct() : mixed
- getComment() : string
- getLabel() : string
- getProperties() : array<string|int, PropertyDesc>
- Returns a distinct set of class properties
- getPropInLang() : string
Properties
$class
Class URIs
public
array<string|int, string>
$class
= []
$classes
Array of classes this class inherits from (including the class URI itself)
public
array<string|int, string>
$classes
= []
$comment
Associative array of rdfs:comment values (langauge as a key)
public
array<string|int, string>
$comment
= []
$id
Internal id of a corresponding repository resource
public
int|null
$id
= null
$label
Associative array of label values (langauge as a key)
public
array<string|int, string>
$label
= []
$properties
Associative array of class properties (property URIs as keys, if a property has many URIs, it will exist under all of them - use the `getProperties()` method to get a distinct list of properties).
public
array<string, PropertyDesc>
$properties
= []
$uri
The ontology entity URI within the ontology namespace
public
string|null
$uri
= null
Methods
__construct()
public
__construct([object|null $d = null ][, array<string|int, string> $ids = [] ][, string|null $nmsp = null ][, string|null $skipNmsp = null ]) : mixed
Parameters
- $d : object|null = null
- $ids : array<string|int, string> = []
- $nmsp : string|null = null
- $skipNmsp : string|null = null
getComment()
public
getComment(string $lang[, string $fallbackLang = 'en' ]) : string
Parameters
- $lang : string
- $fallbackLang : string = 'en'
Return values
stringgetLabel()
public
getLabel(string $lang[, string $fallbackLang = 'en' ]) : string
Parameters
- $lang : string
- $fallbackLang : string = 'en'
Return values
stringgetProperties()
Returns a distinct set of class properties
public
getProperties() : array<string|int, PropertyDesc>
Tags
Return values
array<string|int, PropertyDesc>getPropInLang()
private
getPropInLang(string $property, string $lang, string $fallbackLang) : string
Parameters
- $property : string
- $lang : string
- $fallbackLang : string