protected function getElementData(
        ContainerInterface $container, &$data = []
    ) {
         foreach ($container as $element) {
             if ($element instanceof InputInterface) {
                 $data[$element->getName()] = $element->getValue();
                 continue;
             }

             if ($element instanceof ContainerInterface) {
                 $this->getElementData($element, $data);
                 continue;
             }
        }
    }
protected function getElementData(
        ContainerInterface $container, &$data = []
    ) {
         foreach ($container as $element) {
             if ($element instanceof InputInterface) {
                 $data[$element->getName()] = $element->getValue();
                 continue;
             }

             if ($element instanceof ContainerInterface) {
                 $this->getElementData($element, $data);
                 continue;
             }
        }
    }
protected function getElementData ( ContainerInterface $ container , & $ data = [ ] ) { foreach ( $ container as $ element ) { if ( $ element instanceof InputInterface ) { $ data [ $ element -> getName ( ) ] = $ element -> getValue ( ) ; continue ; } if ( $ element instanceof ContainerInterface ) { $ this -> getElementData ( $ element , $ data ) ; continue ; } } }
Recursively collects all posted data

@param ContainerInterface $container
@param array $data
Recursively collects all posted data