PHP Classes

File: UPGRADE-2.0.md

Recommend this page to a friend!
  Classes of WsdlToPhp   Package Base   UPGRADE-2.0.md   Download  
File: UPGRADE-2.0.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: Package Base
Base classes for implementing a package generator
Author: By
Last change: add newline character
Merge branch '1.x' into develop
Date: 5 years ago
Size: 1,126 bytes
 

Contents

Class file image Download

UPGRADE FROM 1.0 to 2.0

The main change is that the property $soapClient in the abstract class AbstractSoapClientBase is no more static.

Previously:

class MyService extends AbstractSoapClientBase
{
    public function CreateQueue(\Api\StructType\ApiCreateQueue $body)
    {
        try {
            $this->setResult(self::getSoapClient()->CreateQueue($body));
            return $this->getResult();
        } catch (\SoapFault $soapFault) {
            $this->saveLastError(__METHOD__, $soapFault);
            return false;
        }
    }
}

self::getSoapClient() was used to access the SoapClient instance.

Now:

class MyService extends AbstractSoapClientBase
{
    public function CreateQueue(\Api\StructType\ApiCreateQueue $body)
    {
        try {
            $this->setResult($this->getSoapClient()->CreateQueue($body));
            return $this->getResult();
        } catch (\SoapFault $soapFault) {
            $this->saveLastError(__METHOD__, $soapFault);
            return false;
        }
    }
}

$this->getSoapClient() is now used to access the SoapClient instance.