1: <?php
2:
3: declare(strict_types=1);
4:
5: namespace LaravelUi5\OData\Edm\Contracts;
6:
7: use LaravelUi5\OData\Edm\Contracts\Type\TypeFacetsInterface;
8: use LaravelUi5\OData\Edm\Contracts\Type\TypeInterface;
9:
10: /**
11: * A single parameter of a function overload.
12: *
13: * Parameters are positional and named. The first parameter of a bound
14: * function is the binding parameter, which constrains the type the
15: * function may be called on.
16: *
17: * @see OData CSDL XML v4.01 ยง12.9 (Parameter)
18: */
19: interface FunctionParameterInterface extends NamedElementInterface, AnnotatableInterface, AnnotationTargetInterface
20: {
21: /**
22: * The resolved type of this parameter. For collection parameters
23: * this is the element type; use isCollection() to distinguish.
24: */
25: public function getType(): TypeInterface;
26:
27: /**
28: * Whether this parameter accepts a collection of values.
29: */
30: public function isCollection(): bool;
31:
32: /**
33: * Whether null is a permitted value for this parameter.
34: * Defaults to true when not specified.
35: */
36: public function isNullable(): bool;
37:
38: /**
39: * The facets constraining this parameter's type, or null when
40: * none are declared.
41: */
42: public function getFacets(): ?TypeFacetsInterface;
43: }
44: