From b124824a8d554f0d694b7f55851434c0b45b85f2 Mon Sep 17 00:00:00 2001 From: Jonathan Chan Date: Thu, 12 Jun 2014 03:56:54 -0400 Subject: [PATCH] added file type to FormType Parser --- DataTypes.php | 20 ++++++++++---------- Parser/FormTypeParser.php | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/DataTypes.php b/DataTypes.php index 7e02741..1df2190 100644 --- a/DataTypes.php +++ b/DataTypes.php @@ -18,27 +18,27 @@ namespace Nelmio\ApiDocBundle; */ class DataTypes { - const INTEGER = 'integer'; + const INTEGER = 'integer'; - const FLOAT = 'float'; + const FLOAT = 'float'; - const STRING = 'string'; + const STRING = 'string'; - const BOOLEAN = 'boolean'; + const BOOLEAN = 'boolean'; - const FILE = 'file'; + const FILE = 'file'; - const ENUM = 'choice'; + const ENUM = 'choice'; const COLLECTION = 'collection'; - const MODEL = 'model'; + const MODEL = 'model'; - const DATE = 'date'; + const DATE = 'date'; - const DATETIME = 'datetime'; + const DATETIME = 'datetime'; - const TIME = 'time'; + const TIME = 'time'; /** * Returns true if the supplied `actualType` value is considered a primitive type. Returns false, otherwise. diff --git a/Parser/FormTypeParser.php b/Parser/FormTypeParser.php index bddfa05..14a4028 100644 --- a/Parser/FormTypeParser.php +++ b/Parser/FormTypeParser.php @@ -46,6 +46,7 @@ class FormTypeParser implements ParserInterface 'textarea' => DataTypes::STRING, 'country' => DataTypes::STRING, 'choice' => DataTypes::ENUM, + 'file' => DataTypes::FILE, ); public function __construct(FormFactoryInterface $formFactory)