1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace Symfony\Component\DomCrawler;
- class Image extends AbstractUriElement
- {
- public function __construct(\DOMElement $node, string $currentUri = null)
- {
- parent::__construct($node, $currentUri, 'GET');
- }
- protected function getRawUri()
- {
- return $this->node->getAttribute('src');
- }
- protected function setNode(\DOMElement $node)
- {
- if ('img' !== $node->nodeName) {
- throw new \LogicException(sprintf('Unable to visualize a "%s" tag.', $node->nodeName));
- }
- $this->node = $node;
- }
- }
|