public function getQRCodeImageAsDataUri($label, $secret, $size = 200)
    {
        if (!is_int($size) || $size <= 0)
            throw new TwoFactorAuthException('Size must be int > 0');

        $qrcodeprovider = $this->getQrCodeProvider();
        return 'data:'
            . $qrcodeprovider->getMimeType()
            . ';base64,'
            . base64_encode($qrcodeprovider->getQRCodeImage($this->getQRText($label, $secret), $size));
    }
public function getQRCodeImageAsDataUri($label, $secret, $size = 200)
    {
        if (!is_int($size) || $size <= 0)
            throw new TwoFactorAuthException('Size must be int > 0');

        $qrcodeprovider = $this->getQrCodeProvider();
        return 'data:'
            . $qrcodeprovider->getMimeType()
            . ';base64,'
            . base64_encode($qrcodeprovider->getQRCodeImage($this->getQRText($label, $secret), $size));
    }
public function getQRCodeImageAsDataUri ( $ label , $ secret , $ size = 200 ) { if ( ! is_int ( $ size ) || $ size <= 0 ) throw new TwoFactorAuthException ( 'Size must be int > 0' ) ; $ qrcodeprovider = $ this -> getQrCodeProvider ( ) ; return 'data:' . $ qrcodeprovider -> getMimeType ( ) . ';base64,' . base64_encode ( $ qrcodeprovider -> getQRCodeImage ( $ this -> getQRText ( $ label , $ secret ) , $ size ) ) ; }
Get data-uri of QRCode
Get data - uri of QRCode