Skip to content

PHP SOAP client factory - is a wrapper around PHP SoapClient initialization. Initialization of the client when the create function is called, and not at the time of instantiation of the dependency.

License

Notifications You must be signed in to change notification settings

rocketfellows/soap-client-factory

Repository files navigation

PHP SoapClient factory.

Software License PHPStan Badge Code Coverage Badge

PHP SOAP client factory - is a wrapper around PHP SoapClient initialization. Initialization of the client when the create function is called, and not at the time of instantiation of the dependency.

More about PHP SoapClient here: https://www.php.net/manual/en/class.soapclient.php.

Installation.

composer require rocketfellows/soap-client-factory

Package details.

Component composition:

  • SoapClientFactory - factory for creating PHP SoapClient with given parameters.

SoapClientFactory functions:

  • public function create(string $wsdl, ?array $options = []): SoapClient - factory-function takes as parameters the string $wsdl (URI of the WSDL file or NULL if working in non-WSDL mode) and an optional array of parameters $options. More details about the parameters at https://www.php.net/manual/en/class.soapclient.php.

Throwable exceptions:

Usage example.

Create instance of SoapClientFactory and call create function with arguments for PHP SoapClient:

$client = (new SoapClientFactory())->create('test.wsdl');

Contributing.

Welcome to pull requests. If there is a major changes, first please open an issue for discussion.

Please make sure to update tests as appropriate.

About

PHP SOAP client factory - is a wrapper around PHP SoapClient initialization. Initialization of the client when the create function is called, and not at the time of instantiation of the dependency.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published