InputFormField.php in Zircon Profile 8
File
vendor/symfony/dom-crawler/Field/InputFormField.php
View source
<?php
namespace Symfony\Component\DomCrawler\Field;
class InputFormField extends FormField {
protected function initialize() {
if ('input' !== $this->node->nodeName && 'button' !== $this->node->nodeName) {
throw new \LogicException(sprintf('An InputFormField can only be created from an input or button tag (%s given).', $this->node->nodeName));
}
if ('checkbox' === strtolower($this->node
->getAttribute('type'))) {
throw new \LogicException('Checkboxes should be instances of ChoiceFormField.');
}
if ('file' === strtolower($this->node
->getAttribute('type'))) {
throw new \LogicException('File inputs should be instances of FileFormField.');
}
$this->value = $this->node
->getAttribute('value');
}
}
Classes
Name |
Description |
InputFormField |
InputFormField represents an input form field (an HTML input tag). |