-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Route API Endpoint by class name with searching by interface
- Loading branch information
1 parent
6380a46
commit 7086574
Showing
8 changed files
with
153 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,6 @@ class TestEndpoint extends BaseEndpoint | |
'data' => $data, | ||
]); | ||
} | ||
|
||
} | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
parameters: | ||
api: | ||
namespaceConvention: | ||
- '\Baraja\StructuredApi\*Endpoint' | ||
|
||
services: | ||
apiManager: Baraja\StructuredApi\ApiManager(%api.namespaceConvention%) | ||
apiManager: Baraja\StructuredApi\ApiManager | ||
|
||
extensions: | ||
structuredApi: Baraja\StructuredApi\ApiExtension | ||
structuredApi: Baraja\StructuredApi\ApiExtension | ||
|
||
search: | ||
structuredApi: | ||
in: %appDir%/.. | ||
files: ['*Endpoint.php'] | ||
implements: Baraja\StructuredApi\Endpoint | ||
tags: ['structured-api-endpoint'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Baraja\StructuredApi; | ||
|
||
|
||
use Nette\DI\Container; | ||
|
||
interface Endpoint | ||
{ | ||
public function __construct(Container $container); | ||
|
||
/** | ||
* @param mixed[] $data | ||
*/ | ||
public function setData(array $data): void; | ||
|
||
public function startup(): void; | ||
|
||
public function startupCheck(): void; | ||
|
||
public function saveState(): void; | ||
|
||
public function __toString(): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.