Completed
Push — master ( 3efb43...6ac6c3 )
by Андрей
05:02
created

ManagerRegistryResourceEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 47
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getResourceName() 0 4 1
A setResourceName() 0 6 1
1
<?php
2
/**
3
 * @link    https://github.com/nnx-framework/doctrine
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace Nnx\Doctrine\ManagerRegistry;
7
8
use Zend\EventManager\Event;
9
10
/**
11
 * Class ManagerRegistryResourceEvent
12
 *
13
 * @package Nnx\Doctrine\ManagerRegistry
14
 */
15
class ManagerRegistryResourceEvent extends Event implements ManagerRegistryResourceEventInterface
16
{
17
    /**
18
     * Имя события бросаемого когда необходимо получить ObjectManager Doctrine по его имени
19
     *
20
     * @var string
21
     */
22
    const RESOLVE_OBJECT_MANAGER_EVENT = 'resolveObjectManager.managerRegistryResource';
23
24
    /**
25
     * Имя события бросаемого когда необходимо получить соеденение Doctrine по его имени
26
     *
27
     * @var string
28
     */
29
    const RESOLVE_CONNECTION_EVENT = 'resolveConnectionManager.managerRegistryResource';
30
31
    /**
32
     * Имя ресурса
33
     *
34
     * @var string
35
     */
36
    protected $resourceName;
37
38
    /**
39
     * Возвращает имя ресурса
40
     *
41
     * @return string
42
     */
43
    public function getResourceName()
44
    {
45
        return $this->resourceName;
46
    }
47
48
    /**
49
     * Устанавливает имя ресурса
50
     *
51
     * @param string $resourceName
52
     *
53
     * @return $this
54
     */
55
    public function setResourceName($resourceName)
56
    {
57
        $this->resourceName = $resourceName;
58
59
        return $this;
60
    }
61
}
62