3 namespace Mixstore\StoreBundle\Entity
;
5 use Doctrine\ORM\Mapping
as ORM
;
6 use Symfony\Component\Validator\Constraints
as Assert
;
12 * @ORM\Entity(repositoryClass="Mixstore\StoreBundle\Entity\PackageRepository")
19 * @ORM\Column(name="id", type="integer")
21 * @ORM\GeneratedValue(strategy="AUTO")
26 * @ORM\Column(type="datetime")
32 * @ORM\Column(type="datetime")
38 * @ORM\Column(type="string", unique=true)
44 * @ORM\Column(type="text")
50 * @ORM\Column(type="string")
57 * @ORM\Column(type="text", nullable=true)
62 * @ORM\Column(type="text", nullable=true)
64 private $dependencies;
67 * @ORM\Column(type="text")
73 * @ORM\Column(type="string")
77 private $contact; //un email
80 * @ORM\ManyToOne(targetEntity="Mixstore\UserBundle\Entity\User")
81 * @ORM\JoinColumn(nullable=false)
83 private $user; //owner of the package: "webmaster"...
86 * @ORM\ManyToOne(targetEntity="Mixstore\StoreBundle\Entity\Language")
87 * @ORM\JoinColumn(nullable=false)
92 * @ORM\Column(type="string", nullable=true)
94 private $bannerpath; //chemin vers banner image
97 //quick ugly way: TOFIX
102 public function __construct()
106 $this->created
= new \
DateTime('now');
107 $this->modified
= new \
DateTime('now');
115 public function getId()
120 //un package a un "webmaster ID" (masqué sur la page du package, mais permettant de savoir qui a le droit de l'éditer)
125 * @param string $name
128 public function setName($name)
140 public function getName()
151 public function setUrl($url)
163 public function getUrl()
171 * @param string $description
174 public function setDescription($description)
176 $this->description
= $description;
186 public function getDescription()
188 return $this->description
;
194 * @param string $authors
197 public function setAuthors($authors)
199 $this->authors
= $authors;
209 public function getAuthors()
211 return $this->authors
;
217 * @param string $contact
220 public function setContact($contact)
222 $this->contact
= $contact;
232 public function getContact()
234 return $this->contact
;
240 * @param \Mixstore\UserBundle\Entity\User $user
243 public function setUser(\Mixstore\UserBundle\Entity\User
$user)
253 * @return \Mixstore\UserBundle\Entity\User
255 public function getUser()
263 * @param string $headline
266 public function setHeadline($headline)
268 $this->headline
= $headline;
278 public function getHeadline()
280 return $this->headline
;
286 * @param string $bannerpath
289 public function setBannerpath($bannerpath)
291 $this->bannerpath
= $bannerpath;
301 public function getBannerpath()
303 return $this->bannerpath
;
309 * @param \DateTime $modified
312 public function setModified($modified)
314 $this->modified
= $modified;
324 public function getModified()
326 return $this->modified
;
332 * @param \Mixstore\StoreBundle\Entity\Language $language
335 public function setLanguage(\Mixstore\StoreBundle\Entity\Language
$language)
337 $this->language
= $language;
345 * @return \Mixstore\StoreBundle\Entity\Language
347 public function getLanguage()
349 return $this->language
;
355 * @param \DateTime $created
358 public function setCreated($created)
360 $this->created
= $created;
370 public function getCreated()
372 return $this->created
;
378 * @param string $dependencies
381 public function setDependencies($dependencies)
383 $this->dependencies
= $dependencies;
393 public function getDependencies()
395 return $this->dependencies
;