function FormFieldRegistry::remove
Removes a field based on the fully qualified name and its children from the registry.
File
-
vendor/
symfony/ dom-crawler/ FormFieldRegistry.php, line 51
Class
- FormFieldRegistry
- This is an internal class that must not be used directly.
Namespace
Symfony\Component\DomCrawlerCode
public function remove(string $name) : void {
$segments = $this->getSegments($name);
$target =& $this->fields;
while (\count($segments) > 1) {
$path = array_shift($segments);
if (!\is_array($target) || !\array_key_exists($path, $target)) {
return;
}
$target =& $target[$path];
}
unset($target[array_shift($segments)]);
}