Value
in package
implements
JsonLdSerializable
AbstractYes
Value is the abstract base class used for typed values and language-tagged strings.
Tags
Table of Contents
Interfaces
- JsonLdSerializable
- The JsonLdSerializable interface
Properties
- $value : string
- The value in the form of a string
Methods
- equals() : bool
- Compares this instance to the specified value.
- fromJsonLd() : false|LanguageTaggedString|TypedValue
- Create a LanguageTaggedString or TypedValue from a JSON-LD element
- getValue() : string
- Get the value
- setValue() : self
- Set the value
Properties
$value
The value in the form of a string
protected
string
$value
Methods
equals()
Compares this instance to the specified value.
public
abstract equals(mixed $other) : bool
Parameters
- $other : mixed
-
The value this instance should be compared to.
Return values
bool —Returns true if the passed value is the same as this instance; false otherwise.
fromJsonLd()
Create a LanguageTaggedString or TypedValue from a JSON-LD element
public
static fromJsonLd(stdClass $element) : false|LanguageTaggedString|TypedValue
If the passed value element can't be transformed to a language-tagged string or a typed value false is returned.
Parameters
- $element : stdClass
-
The JSON-LD element
Return values
false|LanguageTaggedString|TypedValue —The parsed object
getValue()
Get the value
public
getValue() : string
Return values
string —The value.
setValue()
Set the value
public
setValue(string $value) : self
Parameters
- $value : string
-
The value.