90 lines
1.4 KiB
PHP
90 lines
1.4 KiB
PHP
|
<?php declare(strict_types=1);
|
||
|
|
||
|
namespace App\Captcha\Dto;
|
||
|
|
||
|
final readonly class Coordinators
|
||
|
{
|
||
|
public function __construct(
|
||
|
private int $x1,
|
||
|
private int $y1,
|
||
|
private int $x2,
|
||
|
private int $y2,
|
||
|
private int $x3,
|
||
|
private int $y3,
|
||
|
private int $x4,
|
||
|
private int $y4
|
||
|
) { }
|
||
|
|
||
|
/**
|
||
|
* lower left x-coordinate
|
||
|
* @return int
|
||
|
*/
|
||
|
public function getX1(): int
|
||
|
{
|
||
|
return $this->x1;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* lower left y-coordinate
|
||
|
* @return int
|
||
|
*/
|
||
|
public function getY1(): int
|
||
|
{
|
||
|
return $this->y1;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* lower right x-coordinate
|
||
|
* @return int
|
||
|
*/
|
||
|
public function getX2(): int
|
||
|
{
|
||
|
return $this->x2;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* lower right y-coordinate
|
||
|
* @return int
|
||
|
*/
|
||
|
public function getY2(): int
|
||
|
{
|
||
|
return $this->y2;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* upper right x-coordinate
|
||
|
* @return int
|
||
|
*/
|
||
|
public function getX3(): int
|
||
|
{
|
||
|
return $this->x3;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* upper right y-coordinate
|
||
|
* @return int
|
||
|
*/
|
||
|
public function getY3(): int
|
||
|
{
|
||
|
return $this->y3;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* upper left x-coordinate
|
||
|
* @return int
|
||
|
*/
|
||
|
public function getX4(): int
|
||
|
{
|
||
|
return $this->x4;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* upper left y-coordinate
|
||
|
* @return int
|
||
|
*/
|
||
|
public function getY4(): int
|
||
|
{
|
||
|
return $this->y4;
|
||
|
}
|
||
|
}
|