Advertisement
Guest User

Untitled

a guest
Jun 1st, 2013
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. <?php
  2.  
  3. // src/Multimedia/AccountBundle/Entity/Zdjecia.php
  4.  
  5. namespace Multimedia\AccountBundle\Entity;
  6.  
  7.  
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. use Symfony\Component\HttpFoundation\File\File;
  11. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  12.  
  13.  
  14. //use Doctrine\Common\Collections\ArrayCollection;
  15.  
  16. /**
  17. * @ORM\Entity
  18. * @ORM\Table(name="zdjecia")
  19. * @ORM\HasLifecycleCallbacks
  20. * @Vich\Uploadable
  21. *
  22. */
  23. class Zdjecia
  24. {
  25. /**
  26. * @var integer $idzdjecia
  27. *
  28. * @ORM\Column(name="idzdjecia", type="integer")
  29. * @ORM\Id
  30. * @ORM\GeneratedValue(strategy="AUTO")
  31. */
  32. private $idzdjecia;
  33.  
  34.  
  35. /**
  36. * @Assert\File(
  37. * maxSize="1M",
  38. * mimeTypes={"image/png", "image/jpeg", "image/pjpeg"}
  39. * )
  40. * @Vich\UploadableField(mapping="zdjecia_image", fileNameProperty="imageName")
  41. *
  42. * @var File $image
  43. */
  44. protected $image;
  45.  
  46. /**
  47. * @ORM\Column(type="string", length=255, name="image_name")
  48. *
  49. * @var string $imageName
  50. */
  51. protected $imageName;
  52.  
  53.  
  54. /**
  55. * @var integer $idzwierzatka
  56. * @ORM\Column(name="idzwierzatka", type="integer", length=10 )
  57. */
  58. private $idzwierzatka;
  59.  
  60.  
  61. /**
  62. * @ORM\Column(type="string", length=255, nullable=true)
  63. */
  64. public $path;
  65.  
  66.  
  67.  
  68.  
  69. /**
  70. * Get idzdjecia
  71. *
  72. * @return integer
  73. */
  74. public function getIdzdjecia()
  75. {
  76. return $this->idzdjecia;
  77. }
  78.  
  79. /**
  80. * Set image
  81. *
  82. * @param string $image
  83. */
  84. public function setImage($image)
  85. {
  86. $this->image = $image;
  87. }
  88.  
  89. /**
  90. * Get image
  91. *
  92. * @return string
  93. */
  94. public function getImage()
  95. {
  96. return $this->image;
  97. }
  98.  
  99.  
  100. /**
  101. * Set idzwierzatka
  102. *
  103. * @param integer $idzwierzatka
  104. */
  105. public function setIdzwierzatka($idzwierzatka)
  106. {
  107. $this->idzwierzatka = $idzwierzatka;
  108. }
  109.  
  110. /**
  111. * Get idzwierzatka
  112. *
  113. * @return integer
  114. */
  115. public function getIdzwierzatka()
  116. {
  117. return $this->idzwierzatka;
  118. }
  119.  
  120.  
  121.  
  122. /**
  123. * Set path
  124. *
  125. * @param string $path
  126. */
  127. public function setPath($path)
  128. {
  129. $this->path = $path;
  130. }
  131.  
  132. /**
  133. * Get path
  134. *
  135. * @return string
  136. */
  137. public function getPath()
  138. {
  139. return $this->path;
  140. }
  141.  
  142. /**
  143. * Set imageName
  144. *
  145. * @param string $imageName
  146. * @return Zdjecia
  147. */
  148. public function setImageName($imageName)
  149. {
  150. $this->imageName = $imageName;
  151.  
  152. return $this;
  153. }
  154.  
  155. /**
  156. * Get imageName
  157. *
  158. * @return string
  159. */
  160. public function getImageName()
  161. {
  162. return $this->imageName;
  163. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement