|
static | createPersistentContent ( $input) |
| Validates and creates a ZPersistentObject from the given input data.
|
|
static | validatePersistentKeys ( $input) |
| Check that the required ZPersistentObject keys exists and, if they don't, raise Z511/Missing key errors.
|
|
static | create ( $input) |
| Validates and creates an object of type ZObject from a given input data.
|
|
static | createCustom ( $input) |
| Creates an instance of a custom or user-defined type after validating it's basic structure: the keys are valid ZObject keys and the values have the correct types.
|
|
static | createChild ( $object) |
| Creates an object of type ZObject from the given input.
|
|
◆ create()
static MediaWiki\Extension\WikiLambda\ZObjectFactory::create |
( |
| $input | ) |
|
|
static |
Validates and creates an object of type ZObject from a given input data.
The resulting ZObject will be structurally valid or well-formed.
This method is the entrypoint from WikiLambda ZObject creation parting from their serialized representation.
- Parameters
-
string | array | \stdClass | $input | |
- Returns
- ZObject
- Exceptions
-
◆ createChild()
static MediaWiki\Extension\WikiLambda\ZObjectFactory::createChild |
( |
| $object | ) |
|
|
static |
Creates an object of type ZObject from the given input.
This method should only be called internally, either from the ZObjectFactory of from the ZObject constructors. ZObjects created using this method will not necessarily be structurally valid.
- Parameters
-
string | array | ZObject | \stdClass | $object | The item to turn into a ZObject |
- Returns
- ZObject
- Exceptions
-
◆ createCustom()
static MediaWiki\Extension\WikiLambda\ZObjectFactory::createCustom |
( |
| $input | ) |
|
|
static |
Creates an instance of a custom or user-defined type after validating it's basic structure: the keys are valid ZObject keys and the values have the correct types.
- Deprecated
- Parameters
-
string | array | \stdClass | $input | |
- Returns
- ZObject
- Exceptions
-
◆ createPersistentContent()
static MediaWiki\Extension\WikiLambda\ZObjectFactory::createPersistentContent |
( |
| $input | ) |
|
|
static |
Validates and creates a ZPersistentObject from the given input data.
If the input already has the ZPersistentObejct keys, it uses them to construct the wrapper object. If not, it builds a wrapper ZPersistentObject with empty values. The resulting ZObject will be structurally valid or well-formed.
This method is the entrypoint from WikiLambda content object.
- Parameters
-
string | array | \stdClass | $input | The item to turn into a ZObject |
- Returns
- ZPersistentObject
- Exceptions
-
◆ validatePersistentKeys()
static MediaWiki\Extension\WikiLambda\ZObjectFactory::validatePersistentKeys |
( |
| $input | ) |
|
|
static |
Check that the required ZPersistentObject keys exists and, if they don't, raise Z511/Missing key errors.
- Parameters
-
string | array | \stdClass | $input | The item to check is a ZObject |
- Returns
- bool
- Exceptions
-
The documentation for this class was generated from the following file: