public function FormFieldRegistry::get in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/dom-crawler/FormFieldRegistry.php \Symfony\Component\DomCrawler\FormFieldRegistry::get()
Returns the value of the field and its children.
Parameters
string $name The fully qualified name of the field:
Return value
mixed The value of the field
Throws
\InvalidArgumentException when the name is malformed
\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.
- FormFieldRegistry::set in vendor/
symfony/ dom-crawler/ FormFieldRegistry.php - Set the value of a field and its children.
File
- vendor/
symfony/ dom-crawler/ FormFieldRegistry.php, line 82
Class
- FormFieldRegistry
- This is an internal class that must not be used directly.
Namespace
Symfony\Component\DomCrawlerCode
public function &get($name) {
$segments = $this
->getSegments($name);
$target =& $this->fields;
while ($segments) {
$path = array_shift($segments);
if (!array_key_exists($path, $target)) {
throw new \InvalidArgumentException(sprintf('Unreachable field "%s"', $path));
}
$target =& $target[$path];
}
return $target;
}