Passed
Push — master ( c094f3...23d517 )
by Julito
10:23
created

ResourceRight   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 111
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 111
rs 10
c 0
b 0
f 0
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A getRole() 0 3 1
A getResourceLink() 0 3 1
A setRole() 0 5 1
A getMask() 0 3 1
A getId() 0 3 1
A setId() 0 3 1
A setMask() 0 5 1
A __toString() 0 3 1
A setResourceLink() 0 5 1
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CoreBundle\Entity\Resource;
5
6
use Doctrine\ORM\Mapping as ORM;
7
8
/**
9
 * @ORM\Entity
10
 * @ORM\Table(name="resource_right")
11
 */
12
class ResourceRight
13
{
14
    /**
15
     * @ORM\Id
16
     * @ORM\Column(type="integer")
17
     * @ORM\GeneratedValue(strategy="AUTO")
18
     */
19
    protected $id;
20
21
    /**
22
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Resource\ResourceLink", inversedBy="resourceRight")
23
     * @ORM\JoinColumn(name="resource_link_id", referencedColumnName="id")
24
     */
25
    protected $resourceLink;
26
27
    /**
28
     * @var string
29
     *
30
     * @ORM\Column(name="role", type="string", length=255, nullable=false)
31
     */
32
    protected $role;
33
34
    /**
35
     * @var string
36
     *
37
     * @ORM\Column(name="mask", type="integer", nullable=false)
38
     */
39
    protected $mask;
40
41
    /**
42
     * @return string
43
     */
44
    public function __toString()
45
    {
46
        return (string) $this->getId();
47
    }
48
49
    /**
50
     * @return int
51
     */
52
    public function getId()
53
    {
54
        return $this->id;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    public function getMask()
61
    {
62
        return $this->mask;
63
    }
64
65
    /**
66
     * @param string $mask
67
     *
68
     * @return $this
69
     */
70
    public function setMask($mask)
71
    {
72
        $this->mask = $mask;
73
74
        return $this;
75
    }
76
77
    /**
78
     * @return ResourceLink
79
     */
80
    public function getResourceLink()
81
    {
82
        return $this->resourceLink;
83
    }
84
85
    /**
86
     * @param ResourceLink $resourceLink
87
     *
88
     * @return $this
89
     */
90
    public function setResourceLink($resourceLink)
91
    {
92
        $this->resourceLink = $resourceLink;
93
94
        return $this;
95
    }
96
97
    /**
98
     * @return string
99
     */
100
    public function getRole()
101
    {
102
        return $this->role;
103
    }
104
105
    /**
106
     * @param string $role
107
     *
108
     * @return $this
109
     */
110
    public function setRole($role)
111
    {
112
        $this->role = $role;
113
114
        return $this;
115
    }
116
117
    /**
118
     * @param int $id
119
     */
120
    public function setId($id)
121
    {
122
        $this->id = $id;
123
    }
124
}
125