1 | <?php |
||
9 | class AuthorizationService implements ServiceInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var RequestHandler |
||
13 | */ |
||
14 | protected $request; |
||
15 | |||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $fields; |
||
20 | |||
21 | /** |
||
22 | * @var |
||
23 | */ |
||
24 | protected $response; |
||
25 | |||
26 | /** |
||
27 | * @var Authorization |
||
28 | */ |
||
29 | protected $authorization; |
||
30 | |||
31 | /** |
||
32 | * AuthorizationService constructor. |
||
33 | * @param RequestHandler $request |
||
34 | */ |
||
35 | 2 | public function __construct(RequestHandler $request) |
|
39 | |||
40 | /** |
||
41 | * @param Authorization $authorization |
||
42 | */ |
||
43 | 2 | public function add(EntityInterface $authorization) |
|
49 | |||
50 | /** |
||
51 | * @return bool |
||
52 | */ |
||
53 | 2 | public function authorize() |
|
62 | |||
63 | /** |
||
64 | * @return bool |
||
65 | */ |
||
66 | 2 | protected function checkResponse() |
|
74 | |||
75 | /** |
||
76 | * @return string |
||
77 | */ |
||
78 | 2 | protected function getAuthLink() |
|
82 | |||
83 | /** |
||
84 | * Fill fields for response |
||
85 | */ |
||
86 | 2 | protected function composeFields() |
|
90 | } |