1 | <?php |
||
9 | abstract class AbstractProvider extends \Laravel\Socialite\One\AbstractProvider |
||
10 | { |
||
11 | /** |
||
12 | * Indicates if the session state should be utilized. |
||
13 | * |
||
14 | * @var bool |
||
15 | */ |
||
16 | protected $stateless = true; |
||
17 | |||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $credentialsResponseBody; |
||
22 | |||
23 | public static function serviceContainerKey($providerName) |
||
27 | |||
28 | /** |
||
29 | * @param Config $config |
||
30 | * |
||
31 | * @return $this |
||
32 | */ |
||
33 | public function config(Config $config) |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public function user() |
||
71 | |||
72 | /** |
||
73 | * Redirect the user to the authentication page for the provider. |
||
74 | * |
||
75 | * @return RedirectResponse |
||
76 | */ |
||
77 | public function redirect() |
||
90 | |||
91 | /** |
||
92 | * Get the token credentials for the request. |
||
93 | * |
||
94 | * @return \League\OAuth1\Client\Credentials\TokenCredentials |
||
95 | */ |
||
96 | protected function getToken() |
||
112 | |||
113 | /** |
||
114 | * Indicates that the provider should operate as stateless. |
||
115 | * |
||
116 | * @return $this |
||
117 | */ |
||
118 | public function stateless() |
||
124 | |||
125 | /** |
||
126 | * Determine if the provider is operating as stateless. |
||
127 | * |
||
128 | * @return bool |
||
129 | */ |
||
130 | protected function isStateless() |
||
138 | |||
139 | public static function additionalConfigKeys() |
||
143 | |||
144 | /** |
||
145 | * Set the scopes of the requested access. |
||
146 | * |
||
147 | * @param array $scopes |
||
148 | * @return $this |
||
149 | */ |
||
150 | public function scopes(array $scopes) |
||
156 | |||
157 | /** |
||
158 | * Set the custom parameters of the request. |
||
159 | * |
||
160 | * @param array $parameters |
||
161 | * @return $this |
||
162 | */ |
||
163 | public function with(array $parameters) |
||
169 | } |
||
170 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: