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

Public Member Functions

 __construct ( $language, $value=[])
 Create a ZMonoLingualStringSet instance given a language ZReference and an array or ZTypedList of ZString instances.
 
 isValid ()
 @inheritDoc
 
 getSerialized ( $form=self::FORM_CANONICAL)
 @inheritDoc
 
 getZValue ()
 Get a map representing this ZMonoLingualString language and string set.
 
 getLanguage ()
 Get the Zid that represents the language for this ZMonoLingualStringSet.
 
 getStringSet ()
 Get an array of strings values contained by this ZMonoLingualStringSet.
 
- 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.
 
 getLinkedZObjects ()
 Return all ZObject Zids that are linked to the current ZObject.
 
 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\ZMonoLingualStringSet::__construct ( $language,
$value = [] )

Create a ZMonoLingualStringSet instance given a language ZReference and an array or ZTypedList of ZString instances.

Internally this class bypasses ZTypedList and stores an array.

Parameters
ZReference$language
ZTypedList | array$value
+ Here is the call graph for this function:

Member Function Documentation

◆ getDefinition()

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

@inheritDoc

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

◆ getLanguage()

MediaWiki\Extension\WikiLambda\ZObjects\ZMonoLingualStringSet::getLanguage ( )

Get the Zid that represents the language for this ZMonoLingualStringSet.

Returns
string Language Zid

◆ getSerialized()

MediaWiki\Extension\WikiLambda\ZObjects\ZMonoLingualStringSet::getSerialized ( $form = self::FORM_CANONICAL)

@inheritDoc

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

◆ getStringSet()

MediaWiki\Extension\WikiLambda\ZObjects\ZMonoLingualStringSet::getStringSet ( )

Get an array of strings values contained by this ZMonoLingualStringSet.

Returns
string[] Set of string values

◆ getZValue()

MediaWiki\Extension\WikiLambda\ZObjects\ZMonoLingualStringSet::getZValue ( )

Get a map representing this ZMonoLingualString language and string set.

Returns
array Language and string set of this ZMonoLingualString

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

◆ isValid()

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

@inheritDoc

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


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