1 | <?php |
||
8 | class InputDataBag implements \ArrayAccess |
||
9 | { |
||
10 | // known properties, sensible defaults |
||
11 | const CLIENT_ID = 'client_id'; |
||
12 | const CLIENT_SECRET = 'client_secret'; |
||
13 | const GRANT_TYPE = 'grant_type'; |
||
14 | const USERNAME = 'username'; |
||
15 | const PASSWORD = 'password'; |
||
16 | const REFRESH_TOKEN = 'refresh_token'; |
||
17 | const RESPONSE_TYPE = 'response_type'; |
||
18 | const CODE = 'code'; |
||
19 | const REDIRECT_URI = 'redirect_uri'; |
||
20 | |||
21 | private $data; |
||
22 | |||
23 | public function __construct(array $data) |
||
27 | |||
28 | public function get($property, $default = null) |
||
32 | |||
33 | public function all() |
||
37 | |||
38 | public function getClientId() |
||
42 | |||
43 | public function getClientSecret() |
||
47 | |||
48 | public function getGrantType() |
||
52 | |||
53 | public function getUsername() |
||
57 | |||
58 | public function getPassword() |
||
62 | |||
63 | public function getResponseType() |
||
67 | |||
68 | public function getCode() |
||
72 | |||
73 | public function getRefreshToken() |
||
77 | |||
78 | public function getRedirectUri() |
||
82 | |||
83 | public function offsetExists($offset) |
||
87 | |||
88 | public function offsetGet($offset) |
||
92 | |||
93 | public function offsetSet($offset, $value) |
||
97 | |||
98 | public function offsetUnset($offset) |
||
102 | } |
||
103 |