1: <?php
2:
3: declare(strict_types=1);
4:
5: namespace LaravelUi5\OData\Service\Contracts;
6:
7: /**
8: * Contract for an addressable OData service endpoint.
9: *
10: * This is the single service interface for the entire package. Both the
11: * legacy engine (Controller\Engine) and the new engine (Protocol\Execution\Engine)
12: * consume it. The protected hooks configure() and bindResolvers() are
13: * extension points on ODataService, not part of this public contract.
14: */
15: interface ODataServiceInterface
16: {
17: /**
18: * The URI segment that addresses this service below the OData prefix.
19: *
20: * An empty string means the service is mounted at the prefix root itself.
21: */
22: public function serviceUri(): string;
23:
24: /**
25: * The fully qualified URL of this service's root endpoint, including
26: * the trailing slash, e.g. "https://example.com/odata/partners/".
27: */
28: public function endpoint(): string;
29:
30: /**
31: * The Laravel route path for this service, e.g. "odata/partners".
32: */
33: public function route(): string;
34:
35: /**
36: * The XML namespace used in the $metadata document,
37: * e.g. "MyService.Data".
38: */
39: public function namespace(): string;
40:
41: /**
42: * The absolute filesystem path to a pre-built EDMX file (e.g. from CAPire),
43: * or null for dynamic generation.
44: */
45: public function cachedMetadataXMLPath(): ?string;
46:
47: /**
48: * Returns the fully resolved runtime schema for this service.
49: *
50: * Implementations must cache the result after the first call — schema
51: * construction (discovery + resolver binding) must not repeat per request.
52: */
53: public function schema(): RuntimeSchemaInterface;
54: }
55: