1 | <?php |
||
40 | class SecondFactorService |
||
41 | { |
||
42 | /** |
||
43 | * @var LibrarySecondFactorService |
||
44 | */ |
||
45 | private $service; |
||
46 | |||
47 | /** |
||
48 | * @var ValidatorInterface |
||
49 | */ |
||
50 | private $validator; |
||
51 | |||
52 | /** |
||
53 | * @param LibrarySecondFactorService $service |
||
54 | * @param ValidatorInterface $validator |
||
55 | */ |
||
56 | public function __construct(LibrarySecondFactorService $service, ValidatorInterface $validator) |
||
61 | |||
62 | /** |
||
63 | * @param string $secondFactorId |
||
64 | * @return UnverifiedSecondFactor|null |
||
65 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
66 | * @throws InvalidResponseException When the API responded with invalid data. |
||
67 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
68 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
69 | */ |
||
70 | public function getUnverified($secondFactorId) |
||
90 | |||
91 | /** |
||
92 | * @param string $secondFactorId |
||
93 | * @return VerifiedSecondFactor|null |
||
94 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
95 | * @throws InvalidResponseException When the API responded with invalid data. |
||
96 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
97 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
98 | */ |
||
99 | public function getVerified($secondFactorId) |
||
119 | |||
120 | /** |
||
121 | * @param string $secondFactorId |
||
122 | * @return VettedSecondFactor|null |
||
123 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
124 | * @throws InvalidResponseException When the API responded with invalid data. |
||
125 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
126 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
127 | */ |
||
128 | public function getVetted($secondFactorId) |
||
148 | |||
149 | /** |
||
150 | * @param UnverifiedSecondFactorSearchQuery $query |
||
151 | * @return UnverifiedSecondFactorCollection |
||
152 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
153 | * @throws InvalidResponseException When the API responded with invalid data. |
||
154 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
155 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
156 | */ |
||
157 | public function searchUnverified(UnverifiedSecondFactorSearchQuery $query) |
||
177 | |||
178 | /** |
||
179 | * @param VerifiedSecondFactorSearchQuery $query |
||
180 | * @return VerifiedSecondFactorCollection |
||
181 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
182 | * @throws InvalidResponseException When the API responded with invalid data. |
||
183 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
184 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
185 | */ |
||
186 | public function searchVerified(VerifiedSecondFactorSearchQuery $query) |
||
206 | |||
207 | /** |
||
208 | * @param VettedSecondFactorSearchQuery $query |
||
209 | * @return VettedSecondFactorCollection |
||
210 | * @throws AccessDeniedToResourceException When the consumer isn't authorised to access given resource. |
||
211 | * @throws InvalidResponseException When the API responded with invalid data. |
||
212 | * @throws ResourceReadException When the API doesn't respond with the resource. |
||
213 | * @throws MalformedResponseException When the API doesn't respond with a proper response. |
||
214 | */ |
||
215 | public function searchVetted(VettedSecondFactorSearchQuery $query) |
||
235 | } |
||
236 |
PHP provides two ways to mark string literals. Either with single quotes
'literal'
or with double quotes"literal"
. The difference between these is that string literals in double quotes may contain variables with are evaluated at run-time as well as escape sequences.String literals in single quotes on the other hand are evaluated very literally and the only two characters that needs escaping in the literal are the single quote itself (
\'
) and the backslash (\\
). Every other character is displayed as is.Double quoted string literals may contain other variables or more complex escape sequences.
will print an indented:
Single is Value
If your string literal does not contain variables or escape sequences, it should be defined using single quotes to make that fact clear.
For more information on PHP string literals and available escape sequences see the PHP core documentation.