Full Code of artisaninweb/laravel-soap for AI

master 809073fe1116 cached
12 files
19.4 KB
5.6k tokens
48 symbols
1 requests
Download .txt
Repository: artisaninweb/laravel-soap
Branch: master
Commit: 809073fe1116
Files: 12
Total size: 19.4 KB

Directory structure:
gitextract_te66_s1h/

├── .gitignore
├── LICENSE
├── README.md
├── composer.json
└── src/
    └── Artisaninweb/
        └── SoapWrapper/
            ├── Client.php
            ├── Exceptions/
            │   ├── ServiceAlreadyExists.php
            │   ├── ServiceMethodNotExists.php
            │   └── ServiceNotFound.php
            ├── Facade.php
            ├── Service.php
            ├── ServiceProvider.php
            └── SoapWrapper.php

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
.idea

================================================
FILE: LICENSE
================================================
The MIT License (MIT)

Copyright (c) 2014 Michael van de Rijt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
Laravel SoapClient Wrapper
===========================

A SoapClient wrapper integration for Laravel.<br/>
Makes it easy to use Soap in a Laravel application.<br/>

Please report any bugs or features here: <br/>
https://github.com/artisaninweb/laravel-soap/issues/

Installation
============

## Laravel

####Installation for Laravel 5.2 and above:

Run `composer require artisaninweb/laravel-soap`

Add the service provider in `app/config/app.php`.

```php
Artisaninweb\SoapWrapper\ServiceProvider::class, 
```

To use the alias, add this to the aliases in `app/config/app.php`.

```php
'SoapWrapper' => Artisaninweb\SoapWrapper\Facade\SoapWrapper::class,  
```


####Installation for Laravel 5.1 and below :


Add `artisaninweb/laravel-soap` as requirement to composer.json

```javascript
{
    "require": {
        "artisaninweb/laravel-soap": "0.3.*"
    }
}
```

> If you're using Laravel 5.5 or higher you can skip the two config setups below.

Add the service provider in `app/config/app.php`.

```php
'Artisaninweb\SoapWrapper\ServiceProvider'
```

To use the facade add this to the facades in `app/config/app.php`.

```php
'SoapWrapper' => 'Artisaninweb\SoapWrapper\Facade'
```

## Lumen

Open `bootstrap/app.php` and register the required service provider:
```php
$app->register(Artisaninweb\SoapWrapper\ServiceProvider::class);
```

register class alias:
```php
class_alias('Artisaninweb\SoapWrapper\Facade', 'SoapWrapper');
```

*Facades must be enabled.*


Usage
============

How to add a service to the wrapper and use it.

```php
<?php

namespace App\Http\Controllers;

use Artisaninweb\SoapWrapper\SoapWrapper;
use App\Soap\Request\GetConversionAmount;
use App\Soap\Response\GetConversionAmountResponse;

class SoapController
{
  /**
   * @var SoapWrapper
   */
  protected $soapWrapper;

  /**
   * SoapController constructor.
   *
   * @param SoapWrapper $soapWrapper
   */
  public function __construct(SoapWrapper $soapWrapper)
  {
    $this->soapWrapper = $soapWrapper;
  }

  /**
   * Use the SoapWrapper
   */
  public function show() 
  {
    $this->soapWrapper->add('Currency', function ($service) {
      $service
        ->wsdl('http://currencyconverter.kowabunga.net/converter.asmx?WSDL')
        ->trace(true)
        ->classmap([
          GetConversionAmount::class,
          GetConversionAmountResponse::class,
        ]);
    });

    // Without classmap
    $response = $this->soapWrapper->call('Currency.GetConversionAmount', [
      'CurrencyFrom' => 'USD', 
      'CurrencyTo'   => 'EUR', 
      'RateDate'     => '2014-06-05', 
      'Amount'       => '1000',
    ]);

    var_dump($response);

    // With classmap
    $response = $this->soapWrapper->call('Currency.GetConversionAmount', [
      new GetConversionAmount('USD', 'EUR', '2014-06-05', '1000')
    ]);

    var_dump($response);
    exit;
  }
}
```

Service functions
============
```php
$this->soapWrapper->add('Currency', function ($service) {
    $service
        ->wsdl()                 // The WSDL url
        ->trace(true)            // Optional: (parameter: true/false)
        ->header()               // Optional: (parameters: $namespace,$name,$data,$mustunderstand,$actor)
        ->customHeader()         // Optional: (parameters: $customerHeader) Use this to add a custom SoapHeader or extended class                
        ->cookie()               // Optional: (parameters: $name,$value)
        ->location()             // Optional: (parameter: $location)
        ->certificate()          // Optional: (parameter: $certLocation)
        ->cache(WSDL_CACHE_NONE) // Optional: Set the WSDL cache
    
        // Optional: Set some extra options
        ->options([
            'login' => 'username',
            'password' => 'password'
        ])

        // Optional: Classmap
        ->classmap([
          GetConversionAmount::class,
          GetConversionAmountResponse::class,
        ]);
});
```

Classmap
============

If you are using classmap you can add folders like for example:
- App\Soap
- App\Soap\Request
- App\Soap\Response

Request: App\Soap\Request\GetConversionAmount

```php
<?php

namespace App\Soap\Request;

class GetConversionAmount
{
  /**
   * @var string
   */
  protected $CurrencyFrom;

  /**
   * @var string
   */
  protected $CurrencyTo;

  /**
   * @var string
   */
  protected $RateDate;

  /**
   * @var string
   */
  protected $Amount;

  /**
   * GetConversionAmount constructor.
   *
   * @param string $CurrencyFrom
   * @param string $CurrencyTo
   * @param string $RateDate
   * @param string $Amount
   */
  public function __construct($CurrencyFrom, $CurrencyTo, $RateDate, $Amount)
  {
    $this->CurrencyFrom = $CurrencyFrom;
    $this->CurrencyTo   = $CurrencyTo;
    $this->RateDate     = $RateDate;
    $this->Amount       = $Amount;
  }

  /**
   * @return string
   */
  public function getCurrencyFrom()
  {
    return $this->CurrencyFrom;
  }

  /**
   * @return string
   */
  public function getCurrencyTo()
  {
    return $this->CurrencyTo;
  }

  /**
   * @return string
   */
  public function getRateDate()
  {
    return $this->RateDate;
  }

  /**
   * @return string
   */
  public function getAmount()
  {
    return $this->Amount;
  }
}
```

Response: App\Soap\Response\GetConversionAmountResponse

```php
<?php

namespace App\Soap\Response;

class GetConversionAmountResponse
{
  /**
   * @var string
   */
  protected $GetConversionAmountResult;

  /**
   * GetConversionAmountResponse constructor.
   *
   * @param string
   */
  public function __construct($GetConversionAmountResult)
  {
    $this->GetConversionAmountResult = $GetConversionAmountResult;
  }

  /**
   * @return string
   */
  public function getGetConversionAmountResult()
  {
    return $this->GetConversionAmountResult;
  }
}
```


================================================
FILE: composer.json
================================================
{
    "name": "artisaninweb/laravel-soap",
    "description": "A SoapClient wrapper integration for Laravel",
    "keywords": ["laravel", "soap", "client", "wrapper"],
    "license": "MIT",
    "authors": [
        {
            "name": "Michael van de Rijt",
            "email": "me@mvdrijt.com"
        }
    ],
    "require": {
        "php": ">=5.4.0",
        "ext-soap": "*"
    },
    "autoload": {
        "psr-0": {
            "Artisaninweb\\SoapWrapper": "src/"
        }
    },
    "extra": {
        "laravel": {
            "providers": [
                "Artisaninweb\\SoapWrapper\\ServiceProvider"
            ],
            "aliases": {
                "SoapWrapper": "Artisaninweb\\SoapWrapper\\Facade"
            }
        }
    }
}


================================================
FILE: src/Artisaninweb/SoapWrapper/Client.php
================================================
<?php

namespace Artisaninweb\SoapWrapper;

use SoapClient;

class Client extends SoapClient
{
  /**
   * @var string
   */
  protected $wsdl;

  /**
   * Client constructor.
   *
   * @param string $wsdl
   * @param array  $options
   * @param array  $headers
   */
  public function __construct($wsdl, $options, array $headers = [])
  {
    parent::__construct($wsdl, $options);

    if (!empty($headers)) {
      $this->headers($headers);
    }
  }

  /**
   * Get all functions from the service
   *
   * @return mixed
   */
  public function getFunctions()
  {
    return $this->__getFunctions();
  }

  /**
   * Get the last request
   *
   * @return mixed
   */
  public function getLastRequest()
  {
    return $this->__getLastRequest();
  }

  /**
   * Get the last response
   *
   * @return mixed
   */
  public function getLastResponse()
  {
    return $this->__getLastResponse();
  }

  /**
   * Get the last request headers
   *
   * @return mixed
   */
  public function getLastRequestHeaders()
  {
    return $this->__getLastRequestHeaders();
  }

  /**
   * Get the last response headers
   *
   * @return mixed
   */
  public function getLastResponseHeaders()
  {
    return $this->__getLastResponseHeaders();
  }

  /**
   * Get the types
   *
   * @return mixed
   */
  public function getTypes()
  {
    return $this->__getTypes();
  }

  /**
   * Get all the set cookies
   *
   * @return mixed
   */
  public function getCookies()
  {
    return $this->__getCookies();
  }

  /**
   * Set a new cookie
   *
   * @param string $name
   * @param string $value
   *
   * @return $this
   */
  public function cookie($name, $value)
  {
    $this->__setCookie($name, $value);

    return $this;
  }

  /**
   * Set the location
   *
   * @param string $location
   *
   * @return $this
   */
  public function location($location = '')
  {
    $this->__setLocation($location);

    return $this;
  }

  /**
   * Set the Soap headers
   *
   * @param array $headers
   *
   * @return $this
   */
  protected function headers(array $headers = [])
  {
    $this->__setSoapHeaders($headers);

    return $this;
  }

  /**
   * Do soap request
   *
   * @param string $request
   * @param string $location
   * @param string $action
   * @param string $version
   * @param string $one_way
   *
   * @return mixed
   */
  public function doRequest($request, $location, $action, $version, $one_way)
  {
    return $this->__doRequest($request, $location, $action, $version, $one_way);
  }

  /**
   * Do a soap call on the webservice client
   *
   * @param string $function
   * @param array  $params
   *
   * @return mixed
   */
  public function call($function, $params)
  {
    return call_user_func_array([$this, $function], $params);
  }

  /**
   * Allias to do a soap call on the webservice client
   *
   * @param string $function
   * @param array  $params
   * @param array  $options
   * @param null   $inputHeader
   * @param null   $outputHeaders
   *
   * @return mixed
   */
  public function SoapCall($function,
    array $params,
    array $options = null,
    $inputHeader = null,
    &$outputHeaders = null
  ) {
    return $this->__soapCall($function, $params, $options, $inputHeader, $outputHeaders);
  }
}


================================================
FILE: src/Artisaninweb/SoapWrapper/Exceptions/ServiceAlreadyExists.php
================================================
<?php

namespace Artisaninweb\SoapWrapper\Exceptions;

use Exception;

class ServiceAlreadyExists extends Exception
{
  //
}


================================================
FILE: src/Artisaninweb/SoapWrapper/Exceptions/ServiceMethodNotExists.php
================================================
<?php

namespace Artisaninweb\SoapWrapper\Exceptions;

use Exception;

class ServiceMethodNotExists extends Exception
{
  //
}


================================================
FILE: src/Artisaninweb/SoapWrapper/Exceptions/ServiceNotFound.php
================================================
<?php

namespace Artisaninweb\SoapWrapper\Exceptions;

use Exception;

class ServiceNotFound extends Exception
{
  //
}


================================================
FILE: src/Artisaninweb/SoapWrapper/Facade.php
================================================
<?php

namespace Artisaninweb\SoapWrapper;

class Facade extends \Illuminate\Support\Facades\Facade
{
  /**
   * {@inheritDoc}
   */
  protected static function getFacadeAccessor()
  {
    return SoapWrapper::class;
  }
}


================================================
FILE: src/Artisaninweb/SoapWrapper/Service.php
================================================
<?php

namespace Artisaninweb\SoapWrapper;

use SoapClient;
use SoapHeader;

class Service
{
  /**
   * @var SoapClient
   */
  protected $client;

  /**
   * @var string
   */
  protected $wsdl;

  /**
   * @var boolean
   */
  protected $trace;

  /**
   * @var array
   */
  protected $headers;

  /**
   * @var string
   */
  protected $cache;

  /**
   * @var bool
   */
  protected $certificate;

  /**
   * @var array
   */
  protected $options;

  /**
   * @var array
   */
  protected $classmap;

  /**
   * Service constructor.
   */
  public function __construct()
  {
    $this->wsdl        = null;
    $this->client      = null;
    $this->certificate = false;
    $this->options     = [];
    $this->classmap    = [];
    $this->headers     = [];
  }

  /**
   * Set a custom client
   *
   * @param SoapClient $client
   *
   * @return $this
   */
  public function client(SoapClient $client)
  {
    $this->client = $client;

    return $this;
  }

  /**
   * Get the custom client
   *
   * @return SoapClient
   */
  public function getClient()
  {
    return $this->client;
  }

  /**
   * Set the wsdl of the service
   *
   * @param string $wsdl
   *
   * @return $this
   */
  public function wsdl($wsdl)
  {
    $this->wsdl = $wsdl;

    return $this;
  }

  /**
   * Get the wsdl from the service
   *
   * @return string
   */
  public function getWsdl()
  {
    return $this->wsdl;
  }

  /**
   * Set trace option - enables tracing of request
   *
   * @param boolean $trace
   *
   * @return $this
   */
  public function trace($trace)
  {
    $this->trace = $trace;

    return $this;
  }

  /**
   * Get the trace option
   *
   * @return boolean
   */
  public function getTrace()
  {
    return $this->trace;
  }

  /**
   * Set the WSDL cache
   *
   * @param $cache
   *
   * @return $this
   */
  public function cache($cache)
  {
    $this->cache = $cache;

    return $this;
  }

  /**
   * Get the WSDL cache
   *
   * @return string
   */
  public function getCache()
  {
    return $this->cache;
  }

  /**
   * @param array $classmap
   *
   * @return $this
   */
  public function classMap(array $classmap)
  {
    $this->classmap = $classmap;

    return $this;
  }

  /**
   * Get the classmap
   *
   * @return array
   */
  public function getClassmap()
  {
    $classmap = $this->classmap;
    $classes  = [] ;

    if (!empty($classmap)) {
      foreach ($classmap as $class) {
        // Can't use end because of strict mode :(
        $name = current(array_slice(explode('\\', $class), -1, 1, true));

        $classes[$name] = $class;
      }
    }

    return $classes;
  }

  /**
   * Set the extra options on the SoapClient
   *
   * @param array $options
   *
   * @return $this
   */
  public function options(array $options)
  {
    $this->options = $options;

    return $this;
  }

  /**
   * Get the extra options
   *
   * @return array
   */
  public function getOptions()
  {
    $options = [
      'trace'      => $this->getTrace(),
      'cache_wsdl' => $this->getCache(),
      'classmap'   => $this->getClassmap(),
    ];

    if ($this->certificate) {
      $options['local_cert'] = $this->certificate;
    }

    $this->options = array_merge($options, $this->options);

    return $this->options;
  }

  /**
   * Set the certificate location
   *
   * @param string $certificate
   *
   * @return $this
   */
  public function certificate($certificate)
  {
    if ($certificate) {
      $this->certificate = $certificate;
    }

    return $this;
  }

    /**
     * Get the headers
     *
     * @return array
     */
    public function getHeaders()
    {
        return $this->headers;
    }

  /**
   * Create a new SoapHeader
   *
   * @param string $namespace
   * @param string $name
   * @param null   $data
   * @param bool   $mustUnderstand
   * @param null   $actor
   *
   * @return $this
   */
  public function header($namespace, $name, $data = null, $mustUnderstand = false, $actor = null)
  {
    if ($actor) {
      $this->headers[] = new SoapHeader($namespace, $name, $data, $mustUnderstand, $actor);
    } else {
      $this->headers[] = new SoapHeader($namespace, $name, $data, $mustUnderstand);
    }

    return $this;
  }

  /**
   * Set the Soap headers
   *
   * @param SoapHeader $header
   *
   * @return $this
   */
  public function customHeader($header)
  {
    $this->headers[] = $header;

    return $this;
  }
}


================================================
FILE: src/Artisaninweb/SoapWrapper/ServiceProvider.php
================================================
<?php

namespace Artisaninweb\SoapWrapper;

use \Illuminate\Support\ServiceProvider as LaravelServiceProvider;

class ServiceProvider extends LaravelServiceProvider
{
  /**
   * Bootstrap the application events.
   *
   * @return void
   */
  public function boot()
  {
    // Nothing here
  }

  /**
   * Register the service provider.
   *
   * @return void
   */
  public function register()
  {
    $soapWrapper = new SoapWrapper();

    if (is_array($this->app['config']['soapwrapper'])) {
      $soapWrapper->addByArray($this->app['config']['soapwrapper']);
    }

    $this->app->bindIf(SoapWrapper::class, function () use ($soapWrapper) {
      return $soapWrapper;
    });
  }
}


================================================
FILE: src/Artisaninweb/SoapWrapper/SoapWrapper.php
================================================
<?php

namespace Artisaninweb\SoapWrapper;

use Closure;
use SoapClient;
use Artisaninweb\SoapWrapper\Exceptions\ServiceNotFound;
use Artisaninweb\SoapWrapper\Exceptions\ServiceAlreadyExists;
use Artisaninweb\SoapWrapper\Exceptions\ServiceMethodNotExists;

class SoapWrapper
{
  /**
   * @var array
   */
  protected $services;

  /**
   * SoapWrapper constructor
   */
  public function __construct()
  {
    $this->services = [];
  }

  /**
   * Add a new service to the wrapper
   *
   * @param string  $name
   * @param Closure $closure
   *
   * @return $this
   * @throws ServiceAlreadyExists
   */
  public function add($name, Closure $closure)
  {
    if (!$this->has($name)) {
      $service = new Service();

      $closure($service);

      $this->services[$name] = $service;

      return $this;
    }

    throw new ServiceAlreadyExists("Service '" . $name . "' already exists.");
  }

  /**
   * Add services by array
   *
   * @param array $services
   *
   * @return $this
   *
   * @throws ServiceAlreadyExists
   * @throws ServiceMethodNotExists
   */
  public function addByArray(array $services = [])
  {
    if (!empty($services)) {
      foreach ($services as $name => $methods) {
        if (!$this->has($name)) {
          $service = new Service();

          foreach ($methods as $method => $value) {
            if (method_exists($service, $method)) {
              $service->{$method}($value);
            } else {
                throw new ServiceMethodNotExists(sprintf(
                  "Method '%s' does not exists on the %s service.",
                  $method,
                  $name
                ));
              }
          }

          $this->services[$name] = $service;

          continue;
        }

        throw new ServiceAlreadyExists(sprintf(
          "Service '%s' already exists.",
          $name
        ));
      }
    }

    return $this;
  }

  /**
   * Get the client
   *
   * @param string  $name
   * @param Closure $closure
   *
   * @return mixed
   * @throws ServiceNotFound
   */
    public function client($name, Closure $closure = null)
    {
        if ($this->has($name)) {
            /** @var Service $service */
            $service = $this->services[$name];

            if (is_null($service->getClient())) {
                $client = new Client($service->getWsdl(), $service->getOptions(), $service->getHeaders());
              
                $service->client($client);
            } else {
                $client = $service->getClient();
            }

            return $closure($client);
        }

        throw new ServiceNotFound("Service '" . $name . "' not found.");
    }

  /**
   * A easy access call method
   *
   * @param string $call
   * @param array  $data
   *
   * @return mixed
   */
  public function call($call, $data = [], $options = [])
  {
    list($name, $function) = explode('.', $call, 2);

    return $this->client($name, function ($client) use ($function, $data, $options) {
      /** @var Client $client */
      return $client->SoapCall($function, $data, $options);
    });
  }

  /**
   * Check if wrapper has service
   *
   * @param string $name
   *
   * @return bool
   */
  public function has($name)
  {
    return (array_key_exists($name, $this->services));
  }
}
Download .txt
gitextract_te66_s1h/

├── .gitignore
├── LICENSE
├── README.md
├── composer.json
└── src/
    └── Artisaninweb/
        └── SoapWrapper/
            ├── Client.php
            ├── Exceptions/
            │   ├── ServiceAlreadyExists.php
            │   ├── ServiceMethodNotExists.php
            │   └── ServiceNotFound.php
            ├── Facade.php
            ├── Service.php
            ├── ServiceProvider.php
            └── SoapWrapper.php
Download .txt
SYMBOL INDEX (48 symbols across 8 files)

FILE: src/Artisaninweb/SoapWrapper/Client.php
  class Client (line 7) | class Client extends SoapClient
    method __construct (line 21) | public function __construct($wsdl, $options, array $headers = [])
    method getFunctions (line 35) | public function getFunctions()
    method getLastRequest (line 45) | public function getLastRequest()
    method getLastResponse (line 55) | public function getLastResponse()
    method getLastRequestHeaders (line 65) | public function getLastRequestHeaders()
    method getLastResponseHeaders (line 75) | public function getLastResponseHeaders()
    method getTypes (line 85) | public function getTypes()
    method getCookies (line 95) | public function getCookies()
    method cookie (line 108) | public function cookie($name, $value)
    method location (line 122) | public function location($location = '')
    method headers (line 136) | protected function headers(array $headers = [])
    method doRequest (line 154) | public function doRequest($request, $location, $action, $version, $one...
    method call (line 167) | public function call($function, $params)
    method SoapCall (line 183) | public function SoapCall($function,

FILE: src/Artisaninweb/SoapWrapper/Exceptions/ServiceAlreadyExists.php
  class ServiceAlreadyExists (line 7) | class ServiceAlreadyExists extends Exception

FILE: src/Artisaninweb/SoapWrapper/Exceptions/ServiceMethodNotExists.php
  class ServiceMethodNotExists (line 7) | class ServiceMethodNotExists extends Exception

FILE: src/Artisaninweb/SoapWrapper/Exceptions/ServiceNotFound.php
  class ServiceNotFound (line 7) | class ServiceNotFound extends Exception

FILE: src/Artisaninweb/SoapWrapper/Facade.php
  class Facade (line 5) | class Facade extends \Illuminate\Support\Facades\Facade
    method getFacadeAccessor (line 10) | protected static function getFacadeAccessor()

FILE: src/Artisaninweb/SoapWrapper/Service.php
  class Service (line 8) | class Service
    method __construct (line 53) | public function __construct()
    method client (line 70) | public function client(SoapClient $client)
    method getClient (line 82) | public function getClient()
    method wsdl (line 94) | public function wsdl($wsdl)
    method getWsdl (line 106) | public function getWsdl()
    method trace (line 118) | public function trace($trace)
    method getTrace (line 130) | public function getTrace()
    method cache (line 142) | public function cache($cache)
    method getCache (line 154) | public function getCache()
    method classMap (line 164) | public function classMap(array $classmap)
    method getClassmap (line 176) | public function getClassmap()
    method options (line 200) | public function options(array $options)
    method getOptions (line 212) | public function getOptions()
    method certificate (line 236) | public function certificate($certificate)
    method getHeaders (line 250) | public function getHeaders()
    method header (line 266) | public function header($namespace, $name, $data = null, $mustUnderstan...
    method customHeader (line 284) | public function customHeader($header)

FILE: src/Artisaninweb/SoapWrapper/ServiceProvider.php
  class ServiceProvider (line 7) | class ServiceProvider extends LaravelServiceProvider
    method boot (line 14) | public function boot()
    method register (line 24) | public function register()

FILE: src/Artisaninweb/SoapWrapper/SoapWrapper.php
  class SoapWrapper (line 11) | class SoapWrapper
    method __construct (line 21) | public function __construct()
    method add (line 35) | public function add($name, Closure $closure)
    method addByArray (line 60) | public function addByArray(array $services = [])
    method client (line 103) | public function client($name, Closure $closure = null)
    method call (line 131) | public function call($call, $data = [], $options = [])
    method has (line 148) | public function has($name)
Condensed preview — 12 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (22K chars).
[
  {
    "path": ".gitignore",
    "chars": 5,
    "preview": ".idea"
  },
  {
    "path": "LICENSE",
    "chars": 1086,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2014 Michael van de Rijt\n\nPermission is hereby granted, free of charge, to any pers"
  },
  {
    "path": "README.md",
    "chars": 5788,
    "preview": "Laravel SoapClient Wrapper\n===========================\n\nA SoapClient wrapper integration for Laravel.<br/>\nMakes it easy"
  },
  {
    "path": "composer.json",
    "chars": 754,
    "preview": "{\n    \"name\": \"artisaninweb/laravel-soap\",\n    \"description\": \"A SoapClient wrapper integration for Laravel\",\n    \"keywo"
  },
  {
    "path": "src/Artisaninweb/SoapWrapper/Client.php",
    "chars": 3239,
    "preview": "<?php\n\nnamespace Artisaninweb\\SoapWrapper;\n\nuse SoapClient;\n\nclass Client extends SoapClient\n{\n  /**\n   * @var string\n  "
  },
  {
    "path": "src/Artisaninweb/SoapWrapper/Exceptions/ServiceAlreadyExists.php",
    "chars": 125,
    "preview": "<?php\n\nnamespace Artisaninweb\\SoapWrapper\\Exceptions;\n\nuse Exception;\n\nclass ServiceAlreadyExists extends Exception\n{\n  "
  },
  {
    "path": "src/Artisaninweb/SoapWrapper/Exceptions/ServiceMethodNotExists.php",
    "chars": 127,
    "preview": "<?php\n\nnamespace Artisaninweb\\SoapWrapper\\Exceptions;\n\nuse Exception;\n\nclass ServiceMethodNotExists extends Exception\n{\n"
  },
  {
    "path": "src/Artisaninweb/SoapWrapper/Exceptions/ServiceNotFound.php",
    "chars": 120,
    "preview": "<?php\n\nnamespace Artisaninweb\\SoapWrapper\\Exceptions;\n\nuse Exception;\n\nclass ServiceNotFound extends Exception\n{\n  //\n}\n"
  },
  {
    "path": "src/Artisaninweb/SoapWrapper/Facade.php",
    "chars": 222,
    "preview": "<?php\n\nnamespace Artisaninweb\\SoapWrapper;\n\nclass Facade extends \\Illuminate\\Support\\Facades\\Facade\n{\n  /**\n   * {@inher"
  },
  {
    "path": "src/Artisaninweb/SoapWrapper/Service.php",
    "chars": 4414,
    "preview": "<?php\n\nnamespace Artisaninweb\\SoapWrapper;\n\nuse SoapClient;\nuse SoapHeader;\n\nclass Service\n{\n  /**\n   * @var SoapClient\n"
  },
  {
    "path": "src/Artisaninweb/SoapWrapper/ServiceProvider.php",
    "chars": 688,
    "preview": "<?php\n\nnamespace Artisaninweb\\SoapWrapper;\n\nuse \\Illuminate\\Support\\ServiceProvider as LaravelServiceProvider;\n\nclass Se"
  },
  {
    "path": "src/Artisaninweb/SoapWrapper/SoapWrapper.php",
    "chars": 3284,
    "preview": "<?php\n\nnamespace Artisaninweb\\SoapWrapper;\n\nuse Closure;\nuse SoapClient;\nuse Artisaninweb\\SoapWrapper\\Exceptions\\Service"
  }
]

About this extraction

This page contains the full source code of the artisaninweb/laravel-soap GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 12 files (19.4 KB), approximately 5.6k tokens, and a symbol index with 48 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!