1 | <?php |
||
10 | class Dragon |
||
11 | { |
||
12 | /** |
||
13 | * @var int $id |
||
14 | * @ORM\Id |
||
15 | * @ORM\Column(type="integer") |
||
16 | * @ORM\GeneratedValue |
||
17 | */ |
||
18 | private $id; |
||
19 | |||
20 | /** |
||
21 | * @var string $name |
||
22 | * @ORM\Column(type="string", length=30, nullable=false) |
||
23 | */ |
||
24 | private $name; |
||
25 | |||
26 | /** |
||
27 | * @return int |
||
28 | */ |
||
29 | public function getId() |
||
33 | |||
34 | /** |
||
35 | * @param int $id |
||
36 | */ |
||
37 | public function setId($id) |
||
41 | |||
42 | /** |
||
43 | * @return string |
||
44 | */ |
||
45 | public function getName(): ?string |
||
49 | |||
50 | /** |
||
51 | * @param string $name |
||
52 | */ |
||
53 | public function setName(string $name) |
||
57 | |||
58 | /** |
||
59 | * @return array |
||
60 | */ |
||
61 | public function toArray() |
||
70 | |||
71 | /** |
||
72 | * @return string |
||
73 | */ |
||
74 | public function toJson() |
||
78 | |||
79 | /** |
||
80 | * @return string |
||
81 | */ |
||
82 | public function __toString() |
||
86 | } |
||
87 |