Implement download entity and related stuff. Will build things like user quota on...
[rock.divinelegy.git] / Domain / Entities / Download.php
1 <?php
2
3 namespace Domain\Entities;
4
5 use Domain\Entities\IDownload;
6 use Domain\Entities\IUser;
7 use Domain\Entities\IFile;
8
9 class Download extends AbstractEntity implements IDownload
10 {
11 private $_user;
12 private $_file;
13 private $_timestamp;
14 private $_ip;
15
16 public function __construct(
17 IUser $user,
18 IFile $file,
19 $timestamp,
20 $ip
21 ) {
22 $this->_user = $user;
23 $this->_file = $file;
24 $this->_timestamp = $timestamp;
25 $this->_ip = $ip;
26 }
27
28 public function getFile()
29 {
30 return $this->_file;
31 }
32
33 public function getIp()
34 {
35 return $this->_ip;
36 }
37
38 public function getTimestamp()
39 {
40 return $this->_timestamp;
41 }
42
43 public function getUser()
44 {
45 return $this->_user;
46 }
47 }
48