| Server IP : 172.64.80.1 / Your IP : 172.70.80.151 Web Server : Apache System : Linux mail.federalpolyede.edu.ng 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64 User : federalpolyede.edu.ng_idh35skikv ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/federalpolyede.edu.ng/httpdocs_backup/php-qrcode/src/Output/ |
Upload File : |
<?php
/**
* Class QRStringJSON
*
* @created 25.10.2023
* @author smiley <[email protected]>
* @copyright 2023 smiley
* @license MIT
*
* @noinspection PhpComposerExtensionStubsInspection
*/
namespace chillerlan\QRCode\Output;
use function json_encode;
/**
*
*/
class QRStringJSON extends QROutputAbstract{
final public const MIME_TYPE = 'application/json';
/**
* @inheritDoc
* @throws \JsonException
*/
public function dump(string $file = null):string{
$matrix = $this->matrix->getMatrix($this->options->jsonAsBooleans);
$data = json_encode($matrix, $this->options->jsonFlags);;
$this->saveToFile($data, $file);
return $data;
}
/**
* unused - required by interface
*
* @inheritDoc
* @codeCoverageIgnore
*/
protected function prepareModuleValue(mixed $value):string{
return '';
}
/**
* unused - required by interface
*
* @inheritDoc
* @codeCoverageIgnore
*/
protected function getDefaultModuleValue(bool $isDark):string{
return '';
}
/**
* unused - required by interface
*
* @inheritDoc
* @codeCoverageIgnore
*/
public static function moduleValueIsValid(mixed $value):bool{
return true;
}
}