1 | <?php |
||
13 | class AttributeMapper |
||
14 | { |
||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | private $mapping = []; |
||
19 | |||
20 | /** |
||
21 | * Example: |
||
22 | * |
||
23 | * [ |
||
24 | * BasicAuthentication::KEY => 'basic.username' |
||
25 | * ] |
||
26 | * |
||
27 | * @param array $mapping |
||
28 | */ |
||
29 | public function __construct(array $mapping) |
||
33 | |||
34 | /** |
||
35 | * Execute the middleware. |
||
36 | * |
||
37 | * @param ServerRequestInterface $request |
||
38 | * @param ResponseInterface $response |
||
39 | * @param callable $next |
||
40 | * |
||
41 | * @return ResponseInterface |
||
42 | */ |
||
43 | public function __invoke( |
||
57 | } |