Class LaravelUi5\OData\ODataService

implements ODataServiceInterface

Base OData service implementation.

Subclasses override configure(), registerBindings(), and bindFunctions() to declare their EDM structure, wire entity set resolvers, and bind function/singleton resolvers. The runtime schema is built lazily on the first call to schema() and cached for the lifetime of the instance.

Example:

class PartnerService extends ODataService { public function serviceUri(): string { return 'partners'; } public function namespace(): string { return 'Partners.Data'; }

protected function configure(EdmBuilderInterface $b): EdmBuilderInterface { $this->discoverModel(Partner::class); return $b->namespace('Partners.Data'); }

protected function registerBindings(ResolverMapBuilder $map): void { // Discovered models are auto-registered. Add manual bindings: $c = $map->getEdmx()->getEntityContainer(); $map->sql($c->getEntitySet('ValueHelp'), 'value_help_view'); }

protected function bindFunctions(RuntimeSchemaBuilderInterface $b): void { // Bind function imports and singletons here. } }

Located at ODataService.php
Methods