浏览代码

[Form] Added TODOs and a tweak

Bernhard Schussek 14 年之前
父节点
当前提交
4346097ffd

+ 5 - 0
src/Symfony/Component/Form/Config/AbstractFieldConfig.php

@@ -46,4 +46,9 @@ abstract class AbstractFieldConfig implements FieldConfigInterface
     {
         return array();
     }
+
+    public function getIdentifier()
+    {
+        return get_class($this);
+    }
 }

+ 2 - 0
src/Symfony/Component/Form/Filter/FileUploadFilter.php

@@ -41,6 +41,8 @@ class FileUploadFilter implements FilterInterface
 
     public function filterBoundDataFromClient($data)
     {
+        // TODO should be disableable
+
         // TESTME
         $data = array_merge(array(
             'file' => '',

+ 2 - 0
src/Symfony/Component/Form/Form.php

@@ -155,6 +155,8 @@ class Form extends Field implements \IteratorAggregate, FormInterface, FilterInt
                 throw new UnexpectedTypeException($field, 'FieldInterface or string');
             }
 
+            // TODO turn order of $identifier and $key around
+
             if (func_num_args() > 2 || (func_num_args() > 1 && !is_array(func_get_arg(1)))) {
                 $identifier = func_get_arg(0);
                 $key = func_get_arg(1);

+ 2 - 0
src/Symfony/Component/Form/FormFactory.php

@@ -34,6 +34,8 @@ class FormFactory implements FormFactoryInterface
 
     public function getInstance($identifier, $key = null, array $options = array())
     {
+        // TODO $identifier can be FQN of a config class
+
         $instance = null;
         $hierarchy = array();