Wikibase
MediaWiki Wikibase extension
|
Factory for creating new snaks. More...
Public Member Functions | |
__construct (PropertyDataTypeLookup $dataTypeLookup, DataTypeFactory $dataTypeFactory, SnakValueDeserializer $snakValueDeserializer) | |
newSnak (PropertyId $propertyId, string $snakType, $rawValue=null) | |
Builds and returns a new snak from the provided property, snak type and optional snak value. | |
Private Member Functions | |
deserializeValue (DataType $dataType, $rawValue) | |
Private Attributes | |
PropertyDataTypeLookup | $dataTypeLookup |
DataTypeFactory | $dataTypeFactory |
SnakValueDeserializer | $snakValueDeserializer |
Factory for creating new snaks.
Wikibase\Repo\SnakFactory::__construct | ( | PropertyDataTypeLookup | $dataTypeLookup, |
DataTypeFactory | $dataTypeFactory, | ||
SnakValueDeserializer | $snakValueDeserializer ) |
|
private |
InvalidArgumentException |
Wikibase\Repo\SnakFactory::newSnak | ( | PropertyId | $propertyId, |
string | $snakType, | ||
$rawValue = null ) |
Builds and returns a new snak from the provided property, snak type and optional snak value.
PropertyDataTypeLookupException | from getDataTypeIdForProperty |
OutOfBoundsException | from getType |
InvalidArgumentException | from newDataValue, newDataValue and newSnak |
|
private |
|
private |
|
private |