CompositeEye.php
758 字节
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
<?php
declare(strict_types = 1);
namespace BaconQrCode\Renderer\Eye;
use BaconQrCode\Renderer\Path\Path;
/**
* Combines the style of two different eyes.
*/
final class CompositeEye implements EyeInterface
{
/**
* @var EyeInterface
*/
private $externalEye;
/**
* @var EyeInterface
*/
private $internalEye;
public function __construct(EyeInterface $externalEye, EyeInterface $internalEye)
{
$this->externalEye = $externalEye;
$this->internalEye = $internalEye;
}
public function getExternalPath() : Path
{
return $this->externalEye->getExternalPath();
}
public function getInternalPath() : Path
{
return $this->externalEye->getInternalPath();
}
}