Guest User

Untitled

a guest
Oct 21st, 2017
420
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. * This file is part of the MarketReminder project.
  5. *
  6. * (c) Guillaume Loulier <contact@guillaumeloulier.fr>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11.  
  12. namespace App\Models;
  13.  
  14. /**
  15. * Class Image
  16. *
  17. * @author Guillaume Loulier <contact@guillaumeloulier.fr>
  18. */
  19. class Image
  20. {
  21. /**
  22. * @var int
  23. */
  24. private $id;
  25.  
  26. /**
  27. * @var \DateTime
  28. */
  29. private $creationDate;
  30.  
  31. /**
  32. * @var \DateTime
  33. */
  34. private $modificationDate;
  35.  
  36. /**
  37. * @var string
  38. */
  39. private $alt;
  40.  
  41. /**
  42. * @var string
  43. */
  44. private $url;
  45.  
  46. /**
  47. * @var User
  48. */
  49. private $user;
  50.  
  51. /**
  52. * Image constructor.
  53. */
  54. public function __construct()
  55. {
  56. $this->creationDate = new \DateTime();
  57. }
  58.  
  59. /**
  60. * @return int
  61. */
  62. public function getId():? int
  63. {
  64. return $this->id;
  65. }
  66.  
  67. /**
  68. * @return \DateTime
  69. */
  70. public function getCreationDate(): \DateTime
  71. {
  72. return $this->creationDate;
  73. }
  74.  
  75. /**
  76. * @param \DateTime $creationDate
  77. */
  78. public function setCreationDate(\DateTime $creationDate)
  79. {
  80. $this->creationDate = $creationDate;
  81. }
  82.  
  83. /**
  84. * @return \DateTime
  85. */
  86. public function getModificationDate():? \DateTime
  87. {
  88. return $this->modificationDate;
  89. }
  90.  
  91. /**
  92. * @param \DateTime $modificationDate
  93. */
  94. public function setModificationDate(\DateTime $modificationDate)
  95. {
  96. $this->modificationDate = $modificationDate;
  97. }
  98.  
  99. /**
  100. * @return string
  101. */
  102. public function getAlt(): string
  103. {
  104. return $this->alt;
  105. }
  106.  
  107. /**
  108. * @param string $alt
  109. */
  110. public function setAlt(string $alt)
  111. {
  112. $this->alt = $alt;
  113. }
  114.  
  115. /**
  116. * @return string
  117. */
  118. public function getUrl(): string
  119. {
  120. return $this->url;
  121. }
  122.  
  123. /**
  124. * @param string $url
  125. */
  126. public function setUrl(string $url)
  127. {
  128. $this->url = $url;
  129. }
  130.  
  131. /**
  132. * @return User
  133. */
  134. public function getUser(): User
  135. {
  136. return $this->user;
  137. }
  138.  
  139. /**
  140. * @param User $user
  141. */
  142. public function setUser(User $user)
  143. {
  144. $this->user = $user;
  145. }
  146. }
Add Comment
Please, Sign In to add comment