EntityListenerResolver   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 2
dl 0
loc 52
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A clear() 0 4 1
A resolve() 0 4 1
A register() 0 4 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