-
Notifications
You must be signed in to change notification settings - Fork 14
/
RemoteManagedFile.php
62 lines (48 loc) · 1.11 KB
/
RemoteManagedFile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
namespace inklabs\kommerce\Entity;
use inklabs\kommerce\Exception\ManagedFileException;
class RemoteManagedFile implements ManagedFileInterface
{
/** @var string */
private $uri;
/** @var int */
private $imageType;
/** @var string */
private $mimeType;
/** @var int */
private $width;
/** @var int */
private $height;
public function __construct(string $uri, int $imageType, string $mimeType)
{
$this->uri = $uri;
$this->imageType = $imageType;
$this->mimeType = $mimeType;
$this->width = 0;
$this->height = 0;
}
public function getUri(): string
{
return $this->uri;
}
public function getFullPath(): string
{
throw ManagedFileException::invalidMethodCall();
}
public function getImageType(): int
{
return $this->imageType;
}
public function getMimeType(): string
{
return $this->mimeType;
}
public function getWidth(): int
{
return $this->width;
}
public function getHeight(): int
{
return $this->height;
}
}