function FormFieldRegistry::get
Returns the value of the field based on the fully qualified name and its children.
Return value
FormField|FormField[]|FormField[][]
Throws
\InvalidArgumentException if the field does not exist
2 calls to FormFieldRegistry::get()
- FormFieldRegistry::has in vendor/
symfony/ dom-crawler/ FormFieldRegistry.php - Tests whether the form has the given field based on the fully qualified name.
- FormFieldRegistry::set in vendor/
symfony/ dom-crawler/ FormFieldRegistry.php - Set the value of a field based on the fully qualified name and its children.
File
-
vendor/
symfony/ dom-crawler/ FormFieldRegistry.php, line 72
Class
- FormFieldRegistry
- This is an internal class that must not be used directly.
Namespace
Symfony\Component\DomCrawlerCode
public function &get(string $name) : FormField|array {
$segments = $this->getSegments($name);
$target =& $this->fields;
while ($segments) {
$path = array_shift($segments);
if (!\is_array($target) || !\array_key_exists($path, $target)) {
throw new \InvalidArgumentException(\sprintf('Unreachable field "%s".', $path));
}
$target =& $target[$path];
}
return $target;
}