# speechkit/4.2.0/vendor/symfony/dom-crawler/Image.php

BeyondWords – AI audio for publishers, version 4.2.0. 38 lines.

- Page: https://pluginprobe.com/plugins/speechkit/4.2.0/code/vendor/symfony/dom-crawler/Image.php
- Raw: https://pluginprobe.com/plugins/speechkit/4.2.0/raw/vendor/symfony/dom-crawler/Image.php
- Modified: 2023-10-10T11:03:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/speechkit/4.2.0/code/vendor/symfony/dom-crawler/Image.php#L10-L20`.

```php
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\DomCrawler;

/**
 * Image represents an HTML image (an HTML img tag).
 */
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;
    }
}

```
