src/Nodes/Embedded/SVGImage.php
public static function fromFile($path, $mimeType, $x = null, $y = null, $width = null, $height = null)
    {
        $imageContent = file_get_contents($path);
        if ($imageContent === false) {
            throw new \RuntimeException('Image file "' . $path . '" could not be read.');
        }

        return self::fromString(
            $imageContent,
            $mimeType,
            $x,
            $y,
            $width,
            $height
        );
    }
public static function fromFile($path, $mimeType, $x = null, $y = null, $width = null, $height = null)
    {
        $imageContent = file_get_contents($path);
        if ($imageContent === false) {
            throw new \RuntimeException('Image file "' . $path . '" could not be read.');
        }

        return self::fromString(
            $imageContent,
            $mimeType,
            $x,
            $y,
            $width,
            $height
        );
    }
public static function fromFile ( $ path , $ mimeType , $ x = null , $ y = null , $ width = null , $ height = null ) { $ imageContent = file_get_contents ( $ path ) ; if ( $ imageContent === false ) { throw new \ RuntimeException ( 'Image file "' . $ path . '" could not be read.' ) ; } return self :: fromString ( $ imageContent , $ mimeType , $ x , $ y , $ width , $ height ) ; }
Creates a new SVGImage directly from file

@param string     $path
@param string     $mimeType
@param float|null $x
@param float|null $y
@param float|null $width
@param float|null $height

@return self
Creates a new SVGImage directly from file