Completed
Push — master ( db9c88...be5baf )
by Julito
14:58
created

CChatConversation::setResourceName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CourseBundle\Entity;
6
7
use Chamilo\CoreBundle\Entity\AbstractResource;
8
use Chamilo\CoreBundle\Entity\ResourceInterface;
9
use Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * CChatConversation.
13
 *
14
 * @ORM\Table(name="c_chat_conversation")
15
 * @ORM\Entity
16
 */
17
class CChatConversation extends AbstractResource implements ResourceInterface
18
{
19
    /**
20
     * @var int
21
     *
22
     * @ORM\Column(name="id", type="integer")
23
     * @ORM\Id
24
     * @ORM\GeneratedValue
25
     */
26
    protected $id;
27
28
    /**
29
     * @var string
30
     *
31
     * @ORM\Column(name="name", type="string", length=255, nullable=true)
32
     */
33
    protected $name;
34
35
    public function __toString(): string
36
    {
37
        return $this->getName();
38
    }
39
40
    public function getId(): int
41
    {
42
        return $this->id;
43
    }
44
45
    public function getName(): string
46
    {
47
        return $this->name;
48
    }
49
50
    public function setName(string $name): self
51
    {
52
        $this->name = $name;
53
54
        return $this;
55
    }
56
57
    /**
58
     * Resource identifier.
59
     */
60
    public function getResourceIdentifier(): int
61
    {
62
        return $this->getId();
63
    }
64
65
    public function getResourceName(): string
66
    {
67
        return $this->getName();
68
    }
69
70
    public function setResourceName(string $name): self
71
    {
72
        return $this->setName($name);
73
    }
74
}
75