EntityListenerResolver::resolve()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Kdyby\Doctrine\Mapping;
4
5
use Kdyby;
6
use Nette;
7
8
9
10
class EntityListenerResolver implements \Doctrine\ORM\Mapping\EntityListenerResolver
11
{
12
13
	use \Kdyby\StrictObjects\Scream;
14
15
	/**
16
	 * @var \Nette\DI\Container
17
	 */
18
	private $serviceLocator;
19
20
21
22
	public function __construct(Nette\DI\Container $serviceLocator)
23
	{
24
		$this->serviceLocator = $serviceLocator;
25
	}
26
27
28
29
	/**
30
	 * {@inheritdoc}
31
	 */
32
	public function clear($className = null)
33
	{
34
35
	}
36
37
38
39
	/**
40
     * Returns a entity listener instance for the given class name.
41
     *
42
     * @param string $className The fully-qualified class name
43
     *
44
     * @return object|null An entity listener
45
     */
46
	public function resolve($className)
47
	{
48
		return $this->serviceLocator->getByType($className);
49
	}
50
51
52
53
	/**
54
	 * {@inheritdoc}
55
	 */
56
	public function register($object)
57
	{
58
59
	}
60
61
}
62