Download the PHP package php-soap-backports/ext-soap-engine without Composer
On this page you can find all versions of the php package php-soap-backports/ext-soap-engine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download php-soap-backports/ext-soap-engine
More information about php-soap-backports/ext-soap-engine
Files in php-soap-backports/ext-soap-engine
Package ext-soap-engine
Short Description An ext-soap engine implementation back-porting to PHP 7.1
License MIT
Informations about the package ext-soap-engine
Ext-SOAP powered SOAP engine
This package is a SOAP engine backport that leverages the built-in functions from PHP's ext-soap
extension compatible for php 7.1.
It basically flips the SoapClient
inside out: All the built-in functions for encoding, decoding and HTTP transport can be used in a standalone way.
If your package contains a SoapClient
, you might consider using this package as an alternative:
- It gives you full control over the HTTP layer.
- It validates the
$options
you pass to theSoapClient
and gives you meaningful errors. - It transforms the types and methods into real objects so that you can actually use that information.
- It makes it possible to use the encoding / decoding logic without doing any SOAP calls to a server.
- ...
Want to help out? 💚
- Become a Sponsor of Project author
- Become a Sponsor of Backport author
- Contribute to project
- Contribute to backport project
Installation
Example usage:
This example contains an advanced setup for creating a flexible ext-soap based engine.
It shows you the main components that you can use for configuring PHP's SoapClient
and to transform it into a SOAP engine:
Fetching a SOAP Resource:
You can still set advanced configuration on the actual SOAP client:
Reading / Parsing metadata
Engine
This package provides following engine components:
- ExtSoapEncoder: Uses PHP's
SoapClient
in order to encode a mixed request body into a SOAP request. - ExtSoapDecoder: Uses PHP's
SoapClient
in order to decode a SOAP Response into mixed data. - ExtSoapMetadata: Parses the methods and types from PHP's
SoapClient
into something more usable. - ExtSoapDriver: Combines the ext-soap encoder, decoder and metadata tools into a usable
ext-soap
preset.
Transports
- ExtSoapClientTransport: Uses PHP's
SoapClient
to handle SOAP requests. - ExtSoapServerTransport: Uses PHP's
SoapServer
to handle SOAP requests. It can e.g. be used during Unit tests. - TraceableTransport: Can be used to decorate another transport and keeps track of the last request and response. It should be used as an alternative for fetching it on the SoapClient.
Configuration options
ExtSoapOptions
This package provides a little wrapper around all available \SoapClient
options.
It provides sensible default options. If you want to set specific options, you can do so in a sane way:
It will validate the options before they are passed to the \SoapClient
.
This way, you'll spend less time browsing the official PHP documentation.
ClassMap
By providing a class map, you let ext-soap
know how data of specific SOAP types can be converted to actual classes.
Usage:
TypeConverter
Some exotic XSD types are hard to transform to PHP objects. A typical example are dates: some people like it as a timestamp, some want it as a DateTime, ... By adding custom TypeConverters, it is possible to convert a WSDL type to / from a PHP type.
These TypeConverters are added by default:
- DateTimeTypeConverter
- DateTypeConverter
- DoubleTypeConverter
- DecimalTypeConverter
You can also create your own converter by implementing the TypeConverterInterface
.
Usage:
All versions of ext-soap-engine with dependencies
ext-soap Version *
ext-dom Version *
php-soap-backports/engine Version ^1.3
symfony/options-resolver Version ^4.4