1 <?php
2 /* --------------------------------------------------------------
3 OrderItemDownloadInformation.inc.php 2015-12-23
4 Gambio GmbH
5 http://www.gambio.de
6 Copyright (c) 2015 Gambio GmbH
7 Released under the GNU General Public License (Version 2)
8 [http://www.gnu.org/licenses/gpl-2.0.html]
9 --------------------------------------------------------------
10 */
11
12
13 /**
14 * Class OrderItemDownloadInformation
15 *
16 * @category System
17 * @package Order
18 * @subpackage Entities
19 */
20 class OrderItemDownloadInformation
21 {
22 /**
23 * Filename
24 *
25 * @var string
26 */
27 protected $filename = '';
28
29 /**
30 * Maximal number of days for download.
31 *
32 * @var int
33 */
34 protected $maxDaysAllowed = 0;
35
36 /**
37 * Maximal number of possible downloads.
38 *
39 * @var int
40 */
41 protected $countAvailable = 0;
42
43
44 /**
45 * OrderItemDownloadInformation constructor.
46 *
47 * @param FilenameStringType $filename
48 * @param IntType $maxDaysAllowed
49 * @param IntType $countAvailable
50 */
51 public function __construct(FilenameStringType $filename, IntType $maxDaysAllowed, IntType $countAvailable)
52 {
53 $this->filename = $filename->asString();
54 $this->maxDaysAllowed = $maxDaysAllowed->asInt();
55 $this->countAvailable = $countAvailable->asInt();
56 }
57
58
59 /**
60 * Returns the Filename of the download.
61 *
62 * @return string
63 */
64 public function getFilename()
65 {
66 return $this->filename;
67 }
68
69
70 /**
71 * Returns the number of days where downloads are possible.
72 *
73 * @return int
74 */
75 public function getMaxDaysAllowed()
76 {
77 return $this->maxDaysAllowed;
78 }
79
80
81 /**
82 * Returns the number of possible downloads.
83 *
84 * @return int
85 */
86 public function getCountAvailable()
87 {
88 return $this->countAvailable;
89 }
90 }