Completed
Push — ezp-30639-deprecated-view-acti... ( fa6552...a00a72 )
by
unknown
15:55
created

ProxyAwareDomainMapper::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace eZ\Publish\Core\Repository\Mapper;
10
11
use eZ\Publish\Core\Repository\ProxyFactory\ProxyDomainMapperInterface;
12
13
/**
14
 * @internal For internal use by Domain Mappers
15
 *
16
 * Common abstraction for domain mappers providing properties loaded via proxy.
17
 */
18
abstract class ProxyAwareDomainMapper
19
{
20
    /** @var \eZ\Publish\Core\Repository\ProxyFactory\ProxyDomainMapperInterface */
21
    protected $proxyFactory;
22
23
    public function __construct(?ProxyDomainMapperInterface $proxyFactory = null)
24
    {
25
        $this->proxyFactory = $proxyFactory;
26
    }
27
28
    /**
29
     * Setter for Proxy Factory to work around cyclic dependency issue on Repository.
30
     *
31
     * Note: to be resolved by Repository decoupling.
32
     */
33
    final public function setProxyFactory(ProxyDomainMapperInterface $proxyFactory): void
34
    {
35
        $this->proxyFactory = $proxyFactory;
36
    }
37
}
38