1 | <?php |
||
14 | class AzineHybridAuth { |
||
15 | /** |
||
16 | * ID of the sessionDataCookie |
||
17 | */ |
||
18 | const cookieName = "azine_hybridauth_session"; |
||
19 | |||
20 | /** |
||
21 | * @var ObjectManager |
||
22 | */ |
||
23 | private $objectManager; |
||
24 | |||
25 | /** |
||
26 | * @var UserInterface |
||
27 | */ |
||
28 | private $currentUser; |
||
29 | |||
30 | /** |
||
31 | * @var bool |
||
32 | */ |
||
33 | private $storeForUser; |
||
34 | |||
35 | /** |
||
36 | * @var bool |
||
37 | */ |
||
38 | private $storeAsCookie; |
||
39 | |||
40 | /** |
||
41 | * Configured Instances of HybridAuth |
||
42 | * @var array or HybridAuth |
||
43 | */ |
||
44 | private $instances = array(); |
||
45 | |||
46 | /** |
||
47 | * HybridAuth configuration |
||
48 | * @var array |
||
49 | */ |
||
50 | private $config; |
||
51 | |||
52 | /** |
||
53 | * |
||
54 | * @param UrlGeneratorInterface $router |
||
55 | * @param SecurityContext $securityContext |
||
56 | * @param ObjectManager $manager |
||
57 | * @param array $config |
||
58 | * @param bool $storeForUser |
||
59 | * @param $storeAsCookie |
||
60 | */ |
||
61 | public function __construct(UrlGeneratorInterface $router, SecurityContext $securityContext, ObjectManager $manager, $config, $storeForUser, $storeAsCookie){ |
||
73 | |||
74 | |||
75 | /** |
||
76 | * Get a Hybrid_Auth instance initialised for the given provider. |
||
77 | * HybridAuthSessions will be restored from DB and/or cookies, according to the bundle configuration. |
||
78 | * |
||
79 | * @param $cookieSessionData |
||
80 | * @param $provider |
||
81 | * @return \Hybrid_Auth |
||
82 | */ |
||
83 | public function getInstance($cookieSessionData, $provider){ |
||
115 | |||
116 | /** |
||
117 | * @param Request $request |
||
118 | * @param $provider |
||
119 | * @param $sessionData |
||
120 | * @return Cookie | null |
||
121 | */ |
||
122 | public function storeHybridAuthSessionData(Request $request, $provider, $sessionData){ |
||
130 | |||
131 | /** |
||
132 | * Delete the HybridAuthSessionData entity from the database |
||
133 | * @param $provider |
||
134 | */ |
||
135 | public function deleteSession($provider){ |
||
144 | |||
145 | /** |
||
146 | * Save as HybridAuthSessionData entity to the database. |
||
147 | * Checks the bundle configuration before saving. |
||
148 | * @param $sessionData |
||
149 | * @param $provider |
||
150 | */ |
||
151 | private function saveAuthSessionData($sessionData, $provider){ |
||
164 | |||
165 | public function getCookieName($provider){ |
||
168 | |||
169 | /** |
||
170 | * Use this function to get access to a HybridAuthProvider. |
||
171 | * |
||
172 | * Calling this method will log the user in (make a roundtrip to the providers site and back to your site again) |
||
173 | * and call the page again that you came from. |
||
174 | * |
||
175 | * When logged (allready) it will return the hybridAuth provider. |
||
176 | * |
||
177 | * @param $authSessionData |
||
178 | * @param string $provider_id |
||
179 | * @param boolean $require_login |
||
180 | * @return \Hybrid_Provider_Model |
||
181 | */ |
||
182 | public function getProvider($authSessionData, $provider_id, $require_login = true){ |
||
189 | |||
190 | /** |
||
191 | * Check if the current user has allowed access to the given provider |
||
192 | * @param Request $request |
||
193 | * @param string $provider_id |
||
194 | * @return bool true if access to the provider is granted for this app. |
||
195 | */ |
||
196 | public function isConnected(Request $request, $provider_id){ |
||
202 | |||
203 | /** |
||
204 | * Get the Xing Adapter |
||
205 | * @return \Hybrid_Providers_XING |
||
206 | */ |
||
207 | public function getXing(){ |
||
210 | |||
211 | /** |
||
212 | * Get the Xing api (OAuthClient) |
||
213 | * |
||
214 | * @return \OAuth1Client |
||
215 | */ |
||
216 | public function getXingApi(){ |
||
219 | |||
220 | /** |
||
221 | * Get the LinkedIn Adapter |
||
222 | * |
||
223 | * @return \Hybrid_Providers_LinkedIn |
||
224 | */ |
||
225 | public function getLinkedIn(){ |
||
228 | |||
229 | /** |
||
230 | * Get the LinkedIn api (LinkedIn PHP-client) |
||
231 | * |
||
232 | * @return \LinkedIn |
||
233 | */ |
||
234 | public function getLinkedInApi(){ |
||
237 | |||
238 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: