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