1 | <?php |
||
31 | class SymfonyClient implements ClientInterface |
||
32 | { |
||
33 | /** |
||
34 | * @var FrameworkClient |
||
35 | * |
||
36 | * Client |
||
37 | */ |
||
38 | protected $client; |
||
39 | |||
40 | /** |
||
41 | * @var KernelInterface |
||
42 | * |
||
43 | * Kernel |
||
44 | */ |
||
45 | protected $kernel; |
||
46 | |||
47 | /** |
||
48 | * @var SessionInterface |
||
49 | * |
||
50 | * Session |
||
51 | */ |
||
52 | protected $session; |
||
53 | |||
54 | /** |
||
55 | * @var EnvironmentBuilderInterface |
||
56 | * |
||
57 | * Environment Builder |
||
58 | */ |
||
59 | protected $environmentBuilder; |
||
60 | |||
61 | /** |
||
62 | * Construct |
||
63 | * |
||
64 | * @param EnvironmentBuilderInterface $environmentBuilder Environment Builder |
||
65 | */ |
||
66 | public function __construct( |
||
75 | |||
76 | /** |
||
77 | * Build client |
||
78 | * |
||
79 | * @return $this Self object |
||
80 | */ |
||
81 | public function buildClient() |
||
95 | |||
96 | /** |
||
97 | * Get the HTTP Code Response given an URL instance |
||
98 | * |
||
99 | * @param Url $url Url |
||
100 | * |
||
101 | * @return int Response HTTP Code |
||
102 | */ |
||
103 | public function getResponseHTTPCode(Url $url) |
||
127 | |||
128 | /** |
||
129 | * Authenticates a user if is needed. |
||
130 | * |
||
131 | * A user is needed to be authenticated if in the url a role and a firewall |
||
132 | * is specified. Otherwise, the system will understand that is a public url |
||
133 | * |
||
134 | * @param Url $url Url |
||
135 | * |
||
136 | * @return $this Self object |
||
137 | */ |
||
138 | protected function authenticate(Url $url) |
||
169 | |||
170 | /** |
||
171 | * Expires the authentication if these has been created |
||
172 | * |
||
173 | * @param Url $url Url |
||
174 | * |
||
175 | * @return $this Self object |
||
176 | */ |
||
177 | protected function expireAuthentication(Url $url) |
||
190 | |||
191 | /** |
||
192 | * Destroy client |
||
193 | * |
||
194 | * @return $this Self object |
||
195 | */ |
||
196 | public function destroyClient() |
||
202 | } |
||
203 |