public function add(FormField $field)
    {
        $segments = $this->getSegments($field->getName());

        $target = &$this->fields;
        while ($segments) {
            if (!\is_array($target)) {
                $target = [];
            }
            $path = array_shift($segments);
            if ('' === $path) {
                $target = &$target[];
            } else {
                $target = &$target[$path];
            }
        }
        $target = $field;
    }
public function add(FormField $field)
    {
        $segments = $this->getSegments($field->getName());

        $target = &$this->fields;
        while ($segments) {
            if (!\is_array($target)) {
                $target = [];
            }
            $path = array_shift($segments);
            if ('' === $path) {
                $target = &$target[];
            } else {
                $target = &$target[$path];
            }
        }
        $target = $field;
    }
public function add ( FormField $ field ) { $ segments = $ this -> getSegments ( $ field -> getName ( ) ) ; $ target = & $ this -> fields ; while ( $ segments ) { if ( ! \ is_array ( $ target ) ) { $ target = [ ] ; } $ path = array_shift ( $ segments ) ; if ( '' === $ path ) { $ target = & $ target [ ] ; } else { $ target = & $ target [ $ path ] ; } } $ target = $ field ; }
Adds a field to the registry.
Adds a field to the registry .