public static function fromString($path)
    {
        if (!file_exists($path)) {
            throw new InvalidArgumentType(
                '$path',
                'existing file',
                $path
            );
        }

        return new static(
            array(
                'inputUri' => $path,
                'fileName' => basename($path),
                'fileSize' => filesize($path),
            )
        );
    }
public static function fromString($path)
    {
        if (!file_exists($path)) {
            throw new InvalidArgumentType(
                '$path',
                'existing file',
                $path
            );
        }

        return new static(
            array(
                'inputUri' => $path,
                'fileName' => basename($path),
                'fileSize' => filesize($path),
            )
        );
    }
public static function fromString ( $ path ) { if ( ! file_exists ( $ path ) ) { throw new InvalidArgumentType ( '$path' , 'existing file' , $ path ) ; } return new static ( array ( 'inputUri' => $ path , 'fileName' => basename ( $ path ) , 'fileSize' => filesize ( $ path ) , ) ) ; }
Creates a value only from a file path.

@param string $path

@throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType

@return Value

@deprecated Starting with 5.3.3, handled by Image\Type::acceptValue()
Creates a value only from a file path .