gtx/magento2-webservice

示例 Magento 2 模块,用于 GTX webservice 授权。

安装: 13

依赖: 0

建议: 0

安全: 0

星标: 0

关注者: 1

分支: 0

公开问题: 0

类型:magento2-module

1.0.2 2024-04-26 21:52 UTC

This package is not auto-updated.

Last update: 2024-09-28 00:20:15 UTC


README

示例 Magento2 插件,用于 GTX webservice 授权。

配置

要设置 NTLM 认证,请转到商店 -> 配置 -> Topex -> Webservice

使用方法

<?php

use Gtx\Webservice\Model\File as WebserviceFile;

class MediaGalleryProcessorPlugin
{

    /**
     * @var WebserviceFile
     */
    private WebserviceFile $webserviceFile;

    /**
     * @param WebserviceFile $webserviceFile
     */
    public function __construct(
        WebserviceFile $webserviceFile
    ) {
        $this->webserviceFile = $webserviceFile;
    }

    /**
     * @param string $url
     * @return string
     */
    public function getImageContent(string $url): string
    {
        return $this->webserviceFile->fetch($url);
    }

}