DatasetExtractors
in package
Provides shorthand methods for extracting values from a Dataset without a need to bother with iterators
Tags
Table of Contents
- getGraph() : NamedNodeInterface|BlankNodeInterface|DefaultGraphInterface|null
- getGraphs() : array<string|int, mixed>
- getGraphUri() : string|null
- getGraphUris() : array<string|int, string>
- getLiteral() : LiteralInterface|null
- getLiterals() : array<string|int, LiteralInterface>
- getLiteralValue() : mixed
- getLiteralValues() : array<string|int, mixed>
- getLiteralValuesByLang() : array<string|int, mixed>
- Returns an array of all object literal values with literals' language taken as an array keys and literals' string value taken as values.
- getObject() : TermInterface|null
- getObjectDatatype() : string|null
- getObjectLang() : string|null
- getObjects() : array<string|int, TermInterface>
- getObjectValue() : mixed
- getObjectValues() : array<string|int, mixed>
- getPredicate() : NamedNodeInterface|null
- getPredicates() : array<string|int, NamedNodeInterface>
- getPredicateUri() : string|null
- getPredicateUris() : array<string|int, string>
- getSubject() : TermInterface|null
- getSubjects() : array<string|int, TermInterface>
- getSubjectValue() : mixed
- getSubjectValues() : array<string|int, mixed>
- getSingle() : QuadInterface|null
- getValues() : array<string|int, mixed>
Methods
getGraph()
public
static getGraph(DatasetInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : NamedNodeInterface|BlankNodeInterface|DefaultGraphInterface|null
Parameters
- $dataset : DatasetInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
NamedNodeInterface|BlankNodeInterface|DefaultGraphInterface|null —getGraphs()
public
static getGraphs(DatasetListQuadPartsInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : array<string|int, mixed>
Parameters
- $dataset : DatasetListQuadPartsInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
array<string|int, mixed> —getGraphUri()
public
static getGraphUri(DatasetInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : string|null
Parameters
- $dataset : DatasetInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
string|null —getGraphUris()
public
static getGraphUris(DatasetListQuadPartsInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : array<string|int, string>
Parameters
- $dataset : DatasetListQuadPartsInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
array<string|int, string> —getLiteral()
public
static getLiteral(DatasetListQuadPartsInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : LiteralInterface|null
Parameters
- $dataset : DatasetListQuadPartsInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
LiteralInterface|null —getLiterals()
public
static getLiterals(DatasetListQuadPartsInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : array<string|int, LiteralInterface>
Parameters
- $dataset : DatasetListQuadPartsInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
array<string|int, LiteralInterface> —getLiteralValue()
public
static getLiteralValue(DatasetListQuadPartsInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : mixed
Parameters
- $dataset : DatasetListQuadPartsInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
mixed —getLiteralValues()
public
static getLiteralValues(DatasetListQuadPartsInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : array<string|int, mixed>
Parameters
- $dataset : DatasetListQuadPartsInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
array<string|int, mixed> —getLiteralValuesByLang()
Returns an array of all object literal values with literals' language taken as an array keys and literals' string value taken as values.
public
static getLiteralValuesByLang(DatasetListQuadPartsInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : array<string|int, mixed>
If there are many object literals with the same language tag, the last one is stored under the given language key.
No-language tag object literal value is stored under the empty string key.
Parameters
- $dataset : DatasetListQuadPartsInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
array<string|int, mixed> —getObject()
public
static getObject(DatasetInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : TermInterface|null
Parameters
- $dataset : DatasetInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
TermInterface|null —getObjectDatatype()
public
static getObjectDatatype(DatasetInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : string|null
Parameters
- $dataset : DatasetInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
string|null —getObjectLang()
public
static getObjectLang(DatasetInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : string|null
Parameters
- $dataset : DatasetInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
string|null —getObjects()
public
static getObjects(DatasetListQuadPartsInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : array<string|int, TermInterface>
Parameters
- $dataset : DatasetListQuadPartsInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
array<string|int, TermInterface> —getObjectValue()
public
static getObjectValue(DatasetInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : mixed
Parameters
- $dataset : DatasetInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
mixed —getObjectValues()
public
static getObjectValues(DatasetListQuadPartsInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : array<string|int, mixed>
Parameters
- $dataset : DatasetListQuadPartsInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
array<string|int, mixed> —getPredicate()
public
static getPredicate(DatasetInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : NamedNodeInterface|null
Parameters
- $dataset : DatasetInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
NamedNodeInterface|null —getPredicates()
public
static getPredicates(DatasetListQuadPartsInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : array<string|int, NamedNodeInterface>
Parameters
- $dataset : DatasetListQuadPartsInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
array<string|int, NamedNodeInterface> —getPredicateUri()
public
static getPredicateUri(DatasetInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : string|null
Parameters
- $dataset : DatasetInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
string|null —getPredicateUris()
public
static getPredicateUris(DatasetListQuadPartsInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : array<string|int, string>
Parameters
- $dataset : DatasetListQuadPartsInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
array<string|int, string> —getSubject()
public
static getSubject(DatasetInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : TermInterface|null
Parameters
- $dataset : DatasetInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
TermInterface|null —getSubjects()
public
static getSubjects(DatasetListQuadPartsInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : array<string|int, TermInterface>
Parameters
- $dataset : DatasetListQuadPartsInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
array<string|int, TermInterface> —getSubjectValue()
public
static getSubjectValue(DatasetInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : mixed
Parameters
- $dataset : DatasetInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
mixed —getSubjectValues()
public
static getSubjectValues(DatasetListQuadPartsInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : array<string|int, mixed>
Parameters
- $dataset : DatasetListQuadPartsInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
array<string|int, mixed> —getSingle()
private
static getSingle(DatasetInterface $dataset[, QuadCompareInterface|QuadIteratorInterface|callable $filter = null ]) : QuadInterface|null
Parameters
- $dataset : DatasetInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable = null
Tags
Return values
QuadInterface|null —getValues()
private
static getValues(DatasetInterface $dataset, QuadCompareInterface|QuadIteratorInterface|callable|null $filter, string $method) : array<string|int, mixed>
Parameters
- $dataset : DatasetInterface
- $filter : QuadCompareInterface|QuadIteratorInterface|callable|null
- $method : string