nfqde / soap-bundle
Symfony wrapper for SoapClient
Installs: 24 293
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 5
Forks: 5
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.3
- ext-soap: *
- shanethehat/pretty-xml: ^1.0.2
- symfony/config: ~2.3|~3.0
- symfony/dependency-injection: ~2.3|~3.0
- symfony/http-kernel: ~2.3|~3.0
Requires (Dev)
- phpunit/phpunit: ^4.8
This package is not auto-updated.
Last update: 2024-10-31 16:16:08 UTC
README
SoapBundle provides functionality for PHP SoapClient to be traceable by Symfony WebProfiler.
Features
- Requests are being logged in WebProfiler
- Event is being dispatched after SoapRequest
Installation
-
Add this bundle to your project as composer dependency
composer require nfqde/soap-bundle
-
Add this bundle in application kernel
// app/AppKernel.php public function registerBundles() { // ... $bundles[] = new Nfq\Bundle\SoapBundle\NfqSoapBundle(); return $bundles; }
Usage
Instead of creating SoapClient like new \SoapClient($wsdl, $optionalOptions)
you SHOULD create it via $container->get('nfq_soap.factory')->create($wsdl, $optionalOptions)
which returns an instance of SoapClient.
// Old way $oldSoapClient = new \SoapClient($wsdl); // New way $client = $container->get('nfq_soap.factory')->create($wsdl);
# Old Way services: old_soap_client: class: SoapClient arguments: ["%wsdl_url%"] # New Way services: new_soap_client: class: SoapClient factory: ["@nfq_soap.factory", create] arguments: ["%wsdl_url%"]
License
SoapBundle is licensed under the MIT License - see the LICENSE
file for details