| Total Complexity | 9 |
| Total Lines | 111 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 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() |
||
| 103 | } |
||
| 104 | |||
| 105 | /** |
||
| 106 | * @param string $role |
||
| 107 | * |
||
| 108 | * @return $this |
||
| 109 | */ |
||
| 110 | public function setRole($role) |
||
| 115 | } |
||
| 116 | |||
| 117 | /** |
||
| 118 | * @param int $id |
||
| 119 | */ |
||
| 120 | public function setId($id) |
||
| 123 | } |
||
| 124 | } |
||
| 125 |