Implement download entity and related stuff. Will build things like user quota on...
[rock.divinelegy.git] / Domain / Entities / DownloadFactory.php
1 <?php
2
3 namespace Domain\Entities;
4
5 use Domain\Entities\Download;
6
7 interface IDownloadFactory
8 {
9 public function createInstance(
10 IUser $user,
11 IFile $file,
12 $timestamp,
13 $ip
14 );
15 }
16
17 class DownloadFactory implements IDownloadFactory
18 {
19 public function createInstance(
20 IUser $user,
21 IFile $file,
22 $timestamp,
23 $ip
24 ) {
25 return new Download(
26 $user,
27 $file,
28 $timestamp,
29 $ip
30 );
31 }
32 }