123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?php
- namespace Symfony\Component\DomCrawler\Field;
- abstract class FormField
- {
-
- protected $node;
-
- protected $name;
-
- protected $value;
-
- protected $document;
-
- protected $xpath;
-
- protected $disabled;
-
- public function __construct(\DOMElement $node)
- {
- $this->node = $node;
- $this->name = $node->getAttribute('name');
- $this->xpath = new \DOMXPath($node->ownerDocument);
- $this->initialize();
- }
-
- public function getName()
- {
- return $this->name;
- }
-
- public function getValue()
- {
- return $this->value;
- }
-
- public function setValue($value)
- {
- $this->value = (string) $value;
- }
-
- public function hasValue()
- {
- return true;
- }
-
- public function isDisabled()
- {
- return $this->node->hasAttribute('disabled');
- }
-
- abstract protected function initialize();
- }
|