forked from tomaj/nette-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApiHandlerInterface.php
More file actions
37 lines (32 loc) · 819 Bytes
/
Copy pathApiHandlerInterface.php
File metadata and controls
37 lines (32 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
namespace Tomaj\NetteApi\Handlers;
use Tomaj\NetteApi\EndpointInterface;
use Tomaj\NetteApi\Params\InputParam;
use Nette\Application\IResponse;
interface ApiHandlerInterface
{
/**
* Returns available parameters that handler need
*
* @return InputParam[]
*/
public function params();
/**
* Main handle method that will be executed when api
* endpoint contected with this handler will be triggered
*
* @param array $params
*
* @return IResponse
*/
public function handle($params);
/**
* Set actual endpoint identifier to hnadler.
* It is neccesary for link creation.
*
* @param EndpointInterface $endpoint
*
* @return void
*/
public function setEndpointIdentifier(EndpointInterface $endpoint);
}