WikiLambda
MediaWiki WikiLambda extension
Loading...
Searching...
No Matches
MediaWiki\Extension\WikiLambda\ZObjects\ZFunction Class Reference
+ Inheritance diagram for MediaWiki\Extension\WikiLambda\ZObjects\ZFunction:
+ Collaboration diagram for MediaWiki\Extension\WikiLambda\ZObjects\ZFunction:

Public Member Functions

 __construct ( $arguments, $returnType, $testers, $implementations, $identity)
 Construct a ZFunction instance.
 
 isValid ()
 @inheritDoc
 
 getReturnType ()
 Expected return type of this ZFunction.
 
 getIdentity ()
 Return the string value of its identity.
 
 getArgumentDeclarations ()
 Return an array with the argument declarations, or empty array if undefined.
 
 getTesterZids ()
 Get the Z8K3/Testers and return a list of ZIDs for them.
 
 getImplementationZids ()
 Get the Z8K4/Implementations and return a list of ZIDs for them.
 
- 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 = []
 

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\WikiLambda\ZObjects\ZFunction::__construct ( $arguments,
$returnType,
$testers,
$implementations,
$identity )

Construct a ZFunction instance.

Parameters
ZTypedList$arguments
ZObject$returnType
ZTypedList$testers
ZTypedList$implementations
ZReference$identity

Member Function Documentation

◆ getArgumentDeclarations()

MediaWiki\Extension\WikiLambda\ZObjects\ZFunction::getArgumentDeclarations ( )

Return an array with the argument declarations, or empty array if undefined.

Returns
array

◆ getDefinition()

static MediaWiki\Extension\WikiLambda\ZObjects\ZFunction::getDefinition ( )
static

@inheritDoc

Reimplemented from MediaWiki\Extension\WikiLambda\ZObjects\ZObject.

◆ getIdentity()

MediaWiki\Extension\WikiLambda\ZObjects\ZFunction::getIdentity ( )

Return the string value of its identity.

Returns
string|null

◆ getImplementationZids()

MediaWiki\Extension\WikiLambda\ZObjects\ZFunction::getImplementationZids ( )

Get the Z8K4/Implementations and return a list of ZIDs for them.

Returns
string[]
Exceptions
ZErrorExceptionfrom ZObjectFactory::create

◆ getReturnType()

MediaWiki\Extension\WikiLambda\ZObjects\ZFunction::getReturnType ( )

Expected return type of this ZFunction.

Returns
string|null

◆ getTesterZids()

MediaWiki\Extension\WikiLambda\ZObjects\ZFunction::getTesterZids ( )

Get the Z8K3/Testers and return a list of ZIDs for them.

Returns
string[]
Exceptions
ZErrorExceptionfrom ZObjectFactory::create

◆ isValid()

MediaWiki\Extension\WikiLambda\ZObjects\ZFunction::isValid ( )

@inheritDoc

Reimplemented from MediaWiki\Extension\WikiLambda\ZObjects\ZObject.


The documentation for this class was generated from the following file: