. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 162.0.212.4 / Your IP :
216.73.216.14 [
Web Server : LiteSpeed System : Linux premium146.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : alshnoli ( 2431) PHP Version : 8.3.28 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/alshnoli/public_html/wp-content/plugins/ameliabooking/src/Domain/ValueObjects/ |
Upload File : |
<?php
namespace AmeliaBooking\Domain\ValueObjects;
use AmeliaBooking\Domain\Common\Exceptions\InvalidArgumentException;
/**
* Class Picture
*
* @package AmeliaBooking\Domain\ValueObjects
*/
final class Picture
{
const MAX_LENGTH = 767;
/**
* @var string
*/
private $pathToFull;
/**
* @var string
*/
private $pathToThumb;
/**
* Name constructor.
*
* @param string $pathToFull
* @param string $pathToThumb
*
* @throws InvalidArgumentException
*/
public function __construct($pathToFull, $pathToThumb)
{
if (empty($pathToFull)) {
throw new InvalidArgumentException("Path to full can't be empty");
}
if (strlen($pathToFull) > static::MAX_LENGTH) {
throw new InvalidArgumentException(
"Path to full \"{$pathToFull}\" must be less than " . static::MAX_LENGTH . ' chars'
);
}
if (empty($pathToThumb)) {
throw new InvalidArgumentException("Path to thumb can't be empty");
}
if (strlen($pathToThumb) > static::MAX_LENGTH) {
throw new InvalidArgumentException(
"Path to thumb string length \"{$pathToThumb}\" must be less than " . static::MAX_LENGTH . ' chars'
);
}
$this->pathToFull = $pathToFull;
$this->pathToThumb = $pathToThumb;
}
/**
* Return the Full path
*
* @return string
*/
public function getFullPath()
{
return $this->pathToFull;
}
/**
* Return the Thumb path
*
* @return string
*/
public function getThumbPath()
{
return $this->pathToThumb;
}
}