-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathPhotoUpload.php
More file actions
35 lines (27 loc) · 821 Bytes
/
Copy pathPhotoUpload.php
File metadata and controls
35 lines (27 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace Craue\FormFlowBundle\Tests\IntegrationTestBundle\Entity;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @author Christian Raue <christian.raue@gmail.com>
* @copyright 2011-2015 Christian Raue
* @license http://opensource.org/licenses/mit-license.php MIT License
*/
class PhotoUpload {
/**
* @var UploadedFile
* @Assert\NotNull(groups={"flow_photoUpload_step1"})
* @Assert\Image(groups={"flow_photoUpload_step1"})
*/
public $photo;
/**
* @var string
*/
public $comment;
public function getPhotoDataBase64Encoded() {
return base64_encode(file_get_contents($this->photo->getPathname()));
}
public function getPhotoMimeType() {
return $this->photo->getMimeType();
}
}