src/Adapter/ExtractAdapter.php
private function extractHiddens(&$controls, array $hiddens = null)
    {
        if (!empty($hiddens)) {
            $dom   = new \DOMDocument('1.0');
            $nodes = [];
            foreach ($hiddens as $hidden) {
                $dom->loadHTML($hidden);
                $nodes = $dom->getElementsByTagName('input');
            }
            foreach ($nodes as $node) {
                $controls[$node->getAttribute('name')] = $node->getAttribute('value');
            }
        }
    }
private function extractHiddens(&$controls, array $hiddens = null)
    {
        if (!empty($hiddens)) {
            $dom   = new \DOMDocument('1.0');
            $nodes = [];
            foreach ($hiddens as $hidden) {
                $dom->loadHTML($hidden);
                $nodes = $dom->getElementsByTagName('input');
            }
            foreach ($nodes as $node) {
                $controls[$node->getAttribute('name')] = $node->getAttribute('value');
            }
        }
    }
private function extractHiddens ( & $ controls , array $ hiddens = null ) { if ( ! empty ( $ hiddens ) ) { $ dom = new \ DOMDocument ( '1.0' ) ; $ nodes = [ ] ; foreach ( $ hiddens as $ hidden ) { $ dom -> loadHTML ( $ hidden ) ; $ nodes = $ dom -> getElementsByTagName ( 'input' ) ; } foreach ( $ nodes as $ node ) { $ controls [ $ node -> getAttribute ( 'name' ) ] = $ node -> getAttribute ( 'value' ) ; } } }
extract hidden elements from form

@param array $controls
@param array $hiddens
extract hidden elements from form