WhatsApp PHP

QRCode
in package

WhatsApp PHP QRCode entity.

Tags
author

Gabriel Silva

license

MIT

Table of Contents

Properties

$base64  : string
QR Code image representation in base64.
$raw  : string
The raw QR Code value.

Methods

__construct()  : mixed
Create QR Code entity.
__toString()  : string
Gets the base64 representation of the QR Code.
save()  : string
Saves the QR Code image to a file.
toBlob()  : string
Gets the QR Code image as a binary string representation.

Properties

$base64

QR Code image representation in base64.

public string $base64

$raw

The raw QR Code value.

public string $raw

Methods

__construct()

Create QR Code entity.

public __construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
$data : array<string|int, mixed> = []

(Optional) Associative array of data to populate.

__toString()

Gets the base64 representation of the QR Code.

public __toString() : string
Return values
string —

QR Code as base64.

save()

Saves the QR Code image to a file.

public save(string $path[, string $filename = null ]) : string
Parameters
$path : string

Path where to save the file.

$filename : string = null

(Optional) Image filename, if blank it will be random.

Tags
throws
DownloadMediaException

Throws an exception if the saving fails.

Return values
string —

Returns the saved file location.

toBlob()

Gets the QR Code image as a binary string representation.

public toBlob() : string
Return values
string —

Image blob.


        
On this page

Search results