WikiLambda
MediaWiki WikiLambda extension
|
Public Member Functions | |
__construct ( $identity, $keys, $validator, ?ZObject $equality=null, ?ZObject $renderer=null, ?ZObject $parser=null, ?ZTypedList $deserialisers=null, ?ZTypedList $serialisers=null) | |
Construct a ZType instance given the identity ZReference, a ZTypedList of ZKeys, and a ZReference to the type validator. | |
isValid () | |
@inheritDoc | |
getTypeId () | |
Get the representation of th ZType Zid. | |
getTypeKeys () | |
Get a list with the set of ZKeys for this ZType. | |
getTypeValidator () | |
Get the string representation of the ZReference to this ZType's validator function. | |
getEqualityFunction () | |
Get the string representation of the ZReference to this ZType's equality function, or false if there is none. | |
getRendererFunction () | |
Get the string representation of the ZReference to this ZType's rendering function, or false if there is none. | |
getParserFunction () | |
Get the string representation of the ZReference to this ZType's parsing function, or false if there is none. | |
getDeserialisers () | |
Get the ZList of this ZType's deserialisers. | |
getSerialisers () | |
Get the ZList of this ZType's serialisers. | |
getZKey ( $key) | |
Get the ZKey of a given key reference from the set of ZKeys of this ZType or null if the ZKey is not available. | |
Public Member Functions inherited from MediaWiki\Extension\WikiLambda\ZObjects\ZObject | |
__construct ( $type) | |
Construct a new ZObject instance. | |
getValueByKey (string $key) | |
Fetch value of given key from the current ZObject. | |
setValueByKey (string $key, ZObject $value) | |
Set a value of given key in the current ZObject. | |
isBuiltin () | |
Returns whether this ZObject is a builtin class. | |
isTypeReference () | |
Returns whether the object type is a ZReference that points to a type. | |
isTypeFunctionCall () | |
Returns whether the object type is a ZFunctionCall that resolves to a type. | |
getZTypeObject () | |
Returns either the ZReference or the ZFunctionCall that contain the type of this ZObject (Z1K1) | |
getZType () | |
Returns a string with the Zid representing the type of this ZObject. | |
getZValue () | |
Return the untyped content of this ZObject. | |
getLinkedZObjects () | |
Return all ZObject Zids that are linked to the current ZObject. | |
getSerialized ( $form=self::FORM_CANONICAL) | |
Convert this ZObject into its serialized canonical representation. | |
getHumanReadable ( $language=null) | |
Convert this ZObject into human readable object by translating all keys and references into the preferred language or its fallbacks. | |
__toString () | |
Over-ride the default __toString() method to serialise ZObjects into a JSON representation. | |
Static Public Member Functions | |
static | getDefinition () |
@inheritDoc | |
Additional Inherited Members | |
Public Attributes inherited from MediaWiki\Extension\WikiLambda\ZObjects\ZObject | |
const | FORM_CANONICAL = 1 |
const | FORM_NORMAL = 2 |
Protected Attributes inherited from MediaWiki\Extension\WikiLambda\ZObjects\ZObject | |
$type = null | |
$data = [] | |
$linkedZObjects = [] | |
MediaWiki\Extension\WikiLambda\ZObjects\ZType::__construct | ( | $identity, | |
$keys, | |||
$validator, | |||
?ZObject | $equality = null, | ||
?ZObject | $renderer = null, | ||
?ZObject | $parser = null, | ||
?ZTypedList | $deserialisers = null, | ||
?ZTypedList | $serialisers = null ) |
Construct a ZType instance given the identity ZReference, a ZTypedList of ZKeys, and a ZReference to the type validator.
ZObject | $identity | |
ZObject | $keys | |
ZObject | $validator | |
?ZObject | $equality | |
?ZObject | $renderer | |
?ZObject | $parser | |
?ZTypedList | $deserialisers | |
?ZTypedList | $serialisers |
|
static |
@inheritDoc
Reimplemented from MediaWiki\Extension\WikiLambda\ZObjects\ZObject.
MediaWiki\Extension\WikiLambda\ZObjects\ZType::getDeserialisers | ( | ) |
Get the ZList of this ZType's deserialisers.
MediaWiki\Extension\WikiLambda\ZObjects\ZType::getEqualityFunction | ( | ) |
Get the string representation of the ZReference to this ZType's equality function, or false if there is none.
MediaWiki\Extension\WikiLambda\ZObjects\ZType::getParserFunction | ( | ) |
Get the string representation of the ZReference to this ZType's parsing function, or false if there is none.
MediaWiki\Extension\WikiLambda\ZObjects\ZType::getRendererFunction | ( | ) |
Get the string representation of the ZReference to this ZType's rendering function, or false if there is none.
MediaWiki\Extension\WikiLambda\ZObjects\ZType::getSerialisers | ( | ) |
Get the ZList of this ZType's serialisers.
MediaWiki\Extension\WikiLambda\ZObjects\ZType::getTypeId | ( | ) |
Get the representation of th ZType Zid.
MediaWiki\Extension\WikiLambda\ZObjects\ZType::getTypeKeys | ( | ) |
Get a list with the set of ZKeys for this ZType.
MediaWiki\Extension\WikiLambda\ZObjects\ZType::getTypeValidator | ( | ) |
Get the string representation of the ZReference to this ZType's validator function.
MediaWiki\Extension\WikiLambda\ZObjects\ZType::getZKey | ( | $key | ) |
Get the ZKey of a given key reference from the set of ZKeys of this ZType or null if the ZKey is not available.
string | $key |
MediaWiki\Extension\WikiLambda\ZObjects\ZType::isValid | ( | ) |
@inheritDoc
Reimplemented from MediaWiki\Extension\WikiLambda\ZObjects\ZObject.