equal
deleted
inserted
replaced
|
1 <?php |
|
2 |
|
3 /* |
|
4 * This file is part of the Symfony package. |
|
5 * |
|
6 * (c) Fabien Potencier <fabien@symfony.com> |
|
7 * |
|
8 * For the full copyright and license information, please view the LICENSE |
|
9 * file that was distributed with this source code. |
|
10 */ |
|
11 |
|
12 namespace Symfony\Component\Validator\Constraints; |
|
13 |
|
14 /** |
|
15 * @Annotation |
|
16 * |
|
17 * @api |
|
18 */ |
|
19 class Image extends File |
|
20 { |
|
21 public $mimeTypes = array( |
|
22 'image/png', |
|
23 'image/jpg', |
|
24 'image/jpeg', |
|
25 'image/pjpeg', |
|
26 'image/gif', |
|
27 ); |
|
28 public $mimeTypesMessage = 'This file is not a valid image'; |
|
29 |
|
30 /** |
|
31 * @inheritDoc |
|
32 */ |
|
33 public function validatedBy() |
|
34 { |
|
35 return __NAMESPACE__.'\FileValidator'; |
|
36 } |
|
37 } |