1: <?php
2:
3: declare(strict_types=1);
4:
5: namespace LaravelUi5\OData\Edm\Contracts\Type;
6:
7: use LaravelUi5\OData\Edm\Contracts\AnnotatableInterface;
8: use LaravelUi5\OData\Edm\Contracts\AnnotationTargetInterface;
9: use LaravelUi5\OData\Edm\EdmPrimitiveType;
10:
11: /**
12: * A named type definition, aliasing a primitive type with optional
13: * facet constraints.
14: *
15: * TypeDefinitions allow a domain to introduce named types like
16: * "PhoneNumber" or "ISOCurrencyCode" that are structurally Edm.String
17: * but semantically distinct. Facets declared on the definition refine
18: * the underlying type's value space.
19: *
20: * @see OData CSDL XML v4.01 §11 (Type Definition)
21: */
22: interface TypeDefinitionInterface extends TypeInterface, AnnotatableInterface, AnnotationTargetInterface
23: {
24: /**
25: * The primitive type this definition is based on.
26: *
27: * @see OData CSDL XML v4.01 §11.1
28: */
29: public function getUnderlyingType(): EdmPrimitiveType;
30:
31: /**
32: * The facets constraining the underlying primitive type,
33: * or null if no facets are declared.
34: */
35: public function getFacets(): ?TypeFacetsInterface;
36: }
37: