Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 1 | <?php |
| 2 | |
| 3 | namespace RobThree\Auth\Providers\Qr; |
| 4 | |
| 5 | interface IQRCodeProvider |
| 6 | { |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 7 | /** |
| 8 | * Generate and return the QR code to embed in a web page |
| 9 | * |
| 10 | * @param string $qrtext the value to encode in the QR code |
| 11 | * @param int $size the desired size of the QR code |
| 12 | * |
| 13 | * @return string file contents of the QR code |
| 14 | */ |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 15 | public function getQRCodeImage($qrtext, $size); |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 16 | |
| 17 | /** |
| 18 | * Returns the appropriate mime type for the QR code |
| 19 | * that will be generated |
| 20 | * |
| 21 | * @return string |
| 22 | */ |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 23 | public function getMimeType(); |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 24 | } |