Home

Awesome

SOAP Engine

This package contains the contracts and models that allow you to create a customizable SOAP engine. The design looks like this:

Engine

Every component above can be used seperately in order to create your own customized SOAP Engine.

Want to help out? 💚

Want more information about the future of this project? Check out this list of the next big projects we'll be working on.

Installation

composer install php-soap/engine

Engines

This package provides engines that can be used in a generic way:

SimpleEngine

The SimpleEngine is a wrapper around a previous defined Driver and a Transport implementation.

use Soap\Engine\SimpleEngine;

$engine = new SimpleEngine($driver,$transport);

LazyEngine

You don't want to be loading WSDL files or SOAP services if you don't need to. By wrapping an engine in a lazy engine, you can prevent any WSDL loading from happening before actually requesting a resource.

use Soap\Engine\SimpleEngine;
use Soap\Engine\LazyEngine;

$engine = new LazyEngine(fn () => new SimpleEngine($driver, $transport));

Drivers

This package provides drivers that can be used in a generic way:

SimpleDriver

The SimpleEngine is a wrapper around a previous defined Encoder, Decoder and a Metadata implementation.

use Soap\Engine\SimpleDriver;

$engine = new SimpleDriver($encoder, $decoder, $metadata);

PartialDriver

The PartialDriver is a wrapper around a previous defined Encoder, Decoder and a Metadata implementation. It is possible to only provide one of the required items. When some of the implementations are missing, it will throw a DriverException when the driver's method is invoked.

use Soap\Engine\PartialDriver;

$engine = new PartialDriver(metadata: $metadata);

List of available components:

Creating your own engine

Every component of the engine has its own interface. You can choose to build an entire engine or a specific component. The interfaces look like this:

Testing your engine

To make sure that all components have the same end-result, we provide a set of integration tests that can be used to test your custom components.

Usage:

composer require --dev php-soap/engine-integration-tests

This will make following test cases available: