vaclavvanik/soap-wsdl
最新稳定版本:1.0.0
Composer 安装命令:
composer require vaclavvanik/soap-wsdl
包简介
An easy way to handle WSDL data with zero dependencies
README 文档
README
This package provides an easy way to handle WSDL data with zero dependencies.
Install
You can install this package via composer.
composer require vaclavvanik/soap-wsdl
Usage
StringProvider
Returns WSDL from string variable.
<?php declare(strict_types=1); use VaclavVanik\Soap\Wsdl; $wsdl = (new Wsdl\StringProvider('wsdl-in-string-variable'))->provide();
FileProvider
Returns WSDL from file.
<?php declare(strict_types=1); use VaclavVanik\Soap\Wsdl; $wsdl = (new Wsdl\FileProvider('my-file.wsdl'))->provide();
CacheFileProvider
Loads and save $wsdl from delegated WsdlResourceProvider to cache file.
<?php declare(strict_types=1); use VaclavVanik\Soap\Wsdl; $fileProvider = new Wsdl\FileProvider('my-file.wsdl'); $directory = '/tmp'; $ttl = 3600; $wsdl = (new Wsdl\CacheFileProvider($fileProvider, $directory, $ttl))->provide();
ChainProvider
Returns WSDL from first available WsdlProvider.
<?php declare(strict_types=1); use VaclavVanik\Soap\Wsdl; $fileProvider1 = new Wsdl\FileProvider('/may-be-unreachable/my-file.wsdl'); $fileProvider2 = new Wsdl\FileProvider('/should-be-reachable/my-file.wsdl'); $wsdl = (new Wsdl\ChainProvider($fileProvider1, $fileProvider2))->provide();
HttpProvider
HttpProvider is in separate package vaclavvanik/soap-wsdl-http.
Exceptions
provide methods throw:
- Exception\EmptyContent if provided WSDL is empty.
- Exception\File if error occurs when accessing file.
- Exception\Runtime if any other error occurs.
Run check - coding standards and php-unit
Install dependencies:
make install
Run check:
make check
Changelog
Please see CHANGELOG for more information what has changed recently.
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 122
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-02