Support own namespaces
Closed this issue · 1 comments
sitole commented
I want to use my own code namespaces such as Sitole\Api\Shop
, but now is there only one hardcoded namespace. (PSR-4 autoloader support)
Possible solution: Require endpoints to implements IEndpoint
interface and then autoregister them via Nette SearchExtension.
cc @janbarasek
janbarasek commented
@sitole Implemented by 7086574
All classes implementing interface Baraja\StructuredApi\Endpoint
will be automatically registered by Search extension.
Current configuration:
search:
structuredApi:
in: %appDir%/..
files: ['*Endpoint.php']
implements: Baraja\StructuredApi\Endpoint
tags: ['structured-api-endpoint']
BaseEndpoint implements interface natively.
Thanks.