Download::getDownloadTime()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace AppBundle\Entity;
3
4
use Doctrine\ORM\Mapping as ORM;
5
6
/**
7
 * Download
8
 *
9
 * @ORM\Entity
10
 * @ORM\Table(name="download")
11
 */
12
class Download
13
{
14
	/**
15
	 * @var integer
16
	 *
17
	 * @ORM\Column(name="id", type="integer")
18
	 * @ORM\Id
19
	 * @ORM\GeneratedValue(strategy="AUTO")
20
	 */
21
	private $id;
22
23
	/**
24
	 * @var \DateTime
25
	 *
26
	 * @ORM\Column(name="download_time", type="datetime")
27
	 */
28
	private $downloadTime;
29
30
	/**
31
	 * @var string
32
	 *
33
	 * @ORM\Column(name="package", type="string", length=255)
34
	 */
35
	private $package;
36
37
	/**
38
	 * @var string
39
	 *
40
	 * @ORM\Column(name="ip", type="string", length=255)
41
	 */
42
	private $ip;
43
44
	/**
45
	 * Get id
46
	 *
47
	 * @return integer
48
	 */
49
	public function getId()
50
	{
51
		return $this->id;
52
	}
53
54
	/**
55
	 * Set downloadTime
56
	 *
57
	 * @param \DateTime $downloadTime
58
	 * @return Download
59
	 */
60
	public function setDownloadTime($downloadTime)
61
	{
62
		$this->downloadTime = $downloadTime;
63
64
		return $this;
65
	}
66
67
	/**
68
	 * Get downloadTime
69
	 *
70
	 * @return \DateTime
71
	 */
72
	public function getDownloadTime()
73
	{
74
		return $this->downloadTime;
75
	}
76
77
	/**
78
	 * Set package
79
	 *
80
	 * @param string $package
81
	 * @return Download
82
	 */
83
	public function setPackage($package)
84
	{
85
		$this->package = $package;
86
87
		return $this;
88
	}
89
90
	/**
91
	 * Get package
92
	 *
93
	 * @return string
94
	 */
95
	public function getPackage()
96
	{
97
		return $this->package;
98
	}
99
100
	/**
101
	 * Set ip
102
	 *
103
	 * @param string $ip
104
	 * @return Download
105
	 */
106
	public function setIp($ip)
107
	{
108
		$this->ip = $ip;
109
110
		return $this;
111
	}
112
113
	/**
114
	 * Get ip
115
	 *
116
	 * @return string
117
	 */
118
	public function getIp()
119
	{
120
		return $this->ip;
121
	}
122
123
	public function setConfigurableOptions($package, $ip)
124
	{
125
		$this->downloadTime = new \DateTime("now");
126
		$this->package = $package;
127
		$this->ip = $ip;
128
129
		return $this;
130
	}
131
}
132