DimensionSpacePoint
final class DimensionSpacePoint extends AbstractDimensionSpacePoint (View source)
A point in the dimension space with coordinates DimensionName => DimensionValue.
E.g.: ["language" => "es", "country" => "ar"]
Methods
A variant VarA is a "Direct Variant in Dimension Dim" of another variant VarB, if VarA and VarB are sharing all dimension values except in "Dim", AND they have differing dimension values in "Dim". Thus, VarA and VarB only vary in the given "Dim".
Equals check (as opposed to === same check, which is usually the preferred variant) Compares two hashes, since the DSPs themselves might be of different classes
No description
Creates a dimension space point from a JSON string representation See jsonSerialize
Creates a dimension space point for a zero-dimensional content repository.
Creates a dimension space point from a legacy dimension array in format ['language' => ['es'], 'country' => ['ar']]
Varies a dimension space point in a single coordinate
Details
protected
__construct(array $coordinates, string $hash)
No description
final static protected string
hashCoordinates(array $coordinates)
No description
final static protected void
validateCoordinates(array $coordinates)
No description
final bool
isDirectVariantInDimension(AbstractDimensionSpacePoint $other, ContentDimensionId $contentDimensionId)
A variant VarA is a "Direct Variant in Dimension Dim" of another variant VarB, if VarA and VarB are sharing all dimension values except in "Dim", AND they have differing dimension values in "Dim". Thus, VarA and VarB only vary in the given "Dim".
It does not say anything about how VarA and VarB relate (if it is specialization, peer or generalization).
final bool
hasCoordinate(ContentDimensionId $dimensionId)
No description
final string|null
getCoordinate(ContentDimensionId $dimensionId)
No description
final bool
equals(AbstractDimensionSpacePoint $other)
Equals check (as opposed to === same check, which is usually the preferred variant) Compares two hashes, since the DSPs themselves might be of different classes
final array
toLegacyDimensionArray()
deprecated
deprecated
No description
final array
jsonSerialize()
No description
final string
toJson()
No description
static DimensionSpacePoint
fromArray(array $data)
No description
static DimensionSpacePoint
fromJsonString(string $jsonString)
Creates a dimension space point from a JSON string representation See jsonSerialize
static DimensionSpacePoint
createWithoutDimensions()
Creates a dimension space point for a zero-dimensional content repository.
This applies to content repositories without any dimensions configured.
final static DimensionSpacePoint
fromLegacyDimensionArray(array $legacyDimensionValues)
deprecated
deprecated
Creates a dimension space point from a legacy dimension array in format ['language' => ['es'], 'country' => ['ar']]
final DimensionSpacePoint
vary(ContentDimensionId $dimensionId, string $value)
Varies a dimension space point in a single coordinate