Add captcha image generation functionality.
This commit is contained in:
36
app/Captcha/Dto/Image.php
Normal file
36
app/Captcha/Dto/Image.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Captcha\Dto;
|
||||
|
||||
final readonly class Image
|
||||
{
|
||||
public function __construct(
|
||||
private string $imageBase64,
|
||||
private int $width,
|
||||
private int $height
|
||||
) { }
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getImageBase64(): string
|
||||
{
|
||||
return $this->imageBase64;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getWidth(): int
|
||||
{
|
||||
return $this->width;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getHeight(): int
|
||||
{
|
||||
return $this->height;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user