浏览代码

[Form] Changed name of VirtualFormIterator to VirtualFormAwareIterator

Bernhard Schussek 14 年之前
父节点
当前提交
29d412c15a

+ 3 - 3
src/Symfony/Component/Form/DataMapper/PropertyPathMapper.php

@@ -12,7 +12,7 @@
 namespace Symfony\Component\Form\DataMapper;
 
 use Symfony\Component\Form\FormInterface;
-use Symfony\Component\Form\VirtualFormIterator;
+use Symfony\Component\Form\VirtualFormAwareIterator;
 use Symfony\Component\Form\Exception\FormException;
 
 class PropertyPathMapper implements DataMapperInterface
@@ -39,7 +39,7 @@ class PropertyPathMapper implements DataMapperInterface
                 throw new FormException(sprintf('Form data should be instance of %s', $this->dataClass));
             }
 
-            $iterator = new VirtualFormIterator($forms);
+            $iterator = new VirtualFormAwareIterator($forms);
             $iterator = new \RecursiveIteratorIterator($iterator);
 
             foreach ($iterator as $form) {
@@ -59,7 +59,7 @@ class PropertyPathMapper implements DataMapperInterface
 
     public function mapFormsToData(array $forms, &$data)
     {
-        $iterator = new VirtualFormIterator($forms);
+        $iterator = new VirtualFormAwareIterator($forms);
         $iterator = new \RecursiveIteratorIterator($iterator);
 
         foreach ($iterator as $form) {

+ 4 - 4
src/Symfony/Component/Form/Validator/DelegatingValidator.php

@@ -13,7 +13,7 @@ namespace Symfony\Component\Form\Validator;
 
 use Symfony\Component\Form\FormInterface;
 use Symfony\Component\Form\FormError;
-use Symfony\Component\Form\VirtualFormIterator;
+use Symfony\Component\Form\VirtualFormAwareIterator;
 use Symfony\Component\Form\Exception\FormException;
 use Symfony\Component\Validator\ValidatorInterface;
 use Symfony\Component\Validator\ExecutionContext;
@@ -79,7 +79,7 @@ class DelegatingValidator implements FormValidatorInterface
             $mapping['/^'.preg_quote($formPath . 'data.' . $nestedDataPath).'(?!\w)/'] = $namePath . $nestedNamePath;
         }
 
-        $iterator = new VirtualFormIterator($form->getChildren());
+        $iterator = new VirtualFormAwareIterator($form->getChildren());
         $iterator = new \RecursiveIteratorIterator($iterator);
 
         foreach ($iterator as $child) {
@@ -116,7 +116,7 @@ class DelegatingValidator implements FormValidatorInterface
             $mapping['/^'.preg_quote($dataPath . '.' . $nestedDataPath).'(?!\w)/'] = $namePath . $nestedNamePath;
         }
 
-        $iterator = new VirtualFormIterator($form->getChildren());
+        $iterator = new VirtualFormAwareIterator($form->getChildren());
         $iterator = new \RecursiveIteratorIterator($iterator);
 
         foreach ($iterator as $child) {
@@ -139,7 +139,7 @@ class DelegatingValidator implements FormValidatorInterface
             $namePath .= '.';
         }
 
-        $iterator = new VirtualFormIterator($form->getChildren());
+        $iterator = new VirtualFormAwareIterator($form->getChildren());
         $iterator = new \RecursiveIteratorIterator($iterator);
 
         foreach ($iterator as $child) {

+ 1 - 1
src/Symfony/Component/Form/VirtualFormIterator.php

@@ -19,7 +19,7 @@ namespace Symfony\Component\Form;
  *
  * @author Bernhard Schussek <bernhard.schussek@symfony.com>
  */
-class VirtualFormIterator extends \ArrayIterator implements \RecursiveIterator
+class VirtualFormAwareIterator extends \ArrayIterator implements \RecursiveIterator
 {
     public function getChildren()
     {