Completed
Push — master ( 2ae089...5f42d6 )
by Luis Ramón
13:38
created

DocumentUpload::getCreateDate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/*
3
  ÁTICA - Aplicación web para la gestión documental de centros educativos
4
5
  Copyright (C) 2015-2017: Luis Ramón López López
6
7
  This program is free software: you can redistribute it and/or modify
8
  it under the terms of the GNU Affero General Public License as published by
9
  the Free Software Foundation, either version 3 of the License, or
10
  (at your option) any later version.
11
12
  This program is distributed in the hope that it will be useful,
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
  GNU Affero General Public License for more details.
16
17
  You should have received a copy of the GNU Affero General Public License
18
  along with this program.  If not, see [http://www.gnu.org/licenses/].
19
*/
20
21
namespace AppBundle\Form\Model;
22
23
use AppBundle\Entity\Element;
24
use Symfony\Component\HttpFoundation\File\UploadedFile;
25
use Symfony\Component\Validator\Constraints as Assert;
26
27
class DocumentUpload
28
{
29
    /**
30
     * @Assert\File
31
     * @var UploadedFile
32
     */
33
    private $file;
34
35
    /**
36
     * @var string
37
     */
38
    private $title;
39
40
    /**
41
     * @var string
42
     */
43
    private $description;
44
45
    /**
46
     * @var \DateTime
47
     */
48
    private $createDate;
49
50
    /**
51
     * @Assert\Range(min = 0)
52
     * @var int
53
     */
54
    private $version;
55
56
    /**
57
     * @var Element
58
     */
59
    private $uploadProfile;
60
61
    public function __construct()
62
    {
63
        $this->version = 0;
64
    }
65
66
    /**
67
     * @return UploadedFile
68
     */
69
    public function getFile()
70
    {
71
        return $this->file;
72
    }
73
74
    /**
75
     * @param UploadedFile $file
76
     * @return DocumentUpload
77
     */
78
    public function setFile($file)
79
    {
80
        $this->file = $file;
81
        return $this;
82
    }
83
84
    /**
85
     * @return string
86
     */
87
    public function getTitle()
88
    {
89
        return $this->title;
90
    }
91
92
    /**
93
     * @param string $title
94
     *
95
     * @return DocumentUpload
96
     */
97
    public function setTitle($title)
98
    {
99
        $this->title = $title;
100
        return $this;
101
    }
102
103
    /**
104
     * @return string
105
     */
106
    public function getDescription()
107
    {
108
        return $this->description;
109
    }
110
111
    /**
112
     * @param string $description
113
     *
114
     * @return DocumentUpload
115
     */
116
    public function setDescription($description)
117
    {
118
        $this->description = $description;
119
        return $this;
120
    }
121
122
123
    /**
124
     * @return \DateTime
125
     */
126
    public function getCreateDate()
127
    {
128
        return $this->createDate;
129
    }
130
131
    /**
132
     * @param \DateTime $createDate
133
     *
134
     * @return DocumentUpload
135
     */
136
    public function setCreateDate($createDate)
137
    {
138
        $this->createDate = $createDate;
139
        return $this;
140
    }
141
142
    /**
143
     * @return int
144
     */
145
    public function getVersion()
146
    {
147
        return $this->version;
148
    }
149
150
    /**
151
     * @param int $version
152
     *
153
     * @return DocumentUpload
154
     */
155
    public function setVersion($version)
156
    {
157
        $this->version = $version;
158
        return $this;
159
    }
160
161
    /**
162
     * @return Element
163
     */
164
    public function getUploadProfile()
165
    {
166
        return $this->uploadProfile;
167
    }
168
169
    /**
170
     * @param Element $uploadProfile
171
     *
172
     * @return DocumentUpload
173
     */
174
    public function setUploadProfile($uploadProfile)
175
    {
176
        $this->uploadProfile = $uploadProfile;
177
        return $this;
178
    }
179
}
180