1 | <?php |
||
25 | class Image extends BaseEntity implements ImageInterface |
||
26 | { |
||
27 | /** |
||
28 | * @ORM\Id |
||
29 | * @ORM\GeneratedValue |
||
30 | * @ORM\Column(type="integer") |
||
31 | * |
||
32 | * @var int |
||
33 | */ |
||
34 | protected $id = 0; |
||
35 | |||
36 | /** |
||
37 | * @ORM\Column(type="string", length=256) |
||
38 | * @Assert\NotBlank() |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $source = ''; |
||
43 | |||
44 | /** |
||
45 | * @ORM\ManyToOne(targetEntity="Item", inversedBy="images", cascade={"persist"}) |
||
46 | * @ORM\JoinColumn(name="item", referencedColumnName="id") |
||
47 | * |
||
48 | * @var Item |
||
49 | */ |
||
50 | protected $item; |
||
51 | |||
52 | /** |
||
53 | * @return int |
||
54 | */ |
||
55 | 1 | public function getId() |
|
59 | |||
60 | /** |
||
61 | * @param string $source |
||
62 | * |
||
63 | * @return Image |
||
64 | */ |
||
65 | 2 | public function setSource($source) |
|
71 | |||
72 | /** |
||
73 | * @return string |
||
74 | */ |
||
75 | 2 | public function getSource() |
|
79 | |||
80 | /** |
||
81 | * @return string |
||
82 | */ |
||
83 | 3 | public function getFilename() |
|
87 | |||
88 | /** |
||
89 | * @param string $filename |
||
90 | * |
||
91 | * @return Image |
||
92 | */ |
||
93 | 3 | public function setFilename($filename) |
|
100 | |||
101 | /** |
||
102 | * @param Item $item |
||
103 | * |
||
104 | * @return Image |
||
105 | */ |
||
106 | 1 | public function setItem(Item $item = null) |
|
124 | |||
125 | /** |
||
126 | * @return Item |
||
127 | */ |
||
128 | 1 | public function getItem() |
|
132 | |||
133 | /** |
||
134 | * @return string |
||
135 | */ |
||
136 | 1 | public function __toString() |
|
140 | } |
||
141 |