### Install via Command Line Source: https://github.com/wsdltophp/packagegenerator/blob/develop/README.md Download the PHAR file and make it executable in your system path. ```bash $ wget https://phar.wsdltophp.com/wsdltophp-php7.phar $ chmod +x wsdltophp-php7.phar $ mv wsdltophp-php7.phar /usr/local/bin/wsdltophp ``` -------------------------------- ### Install via Composer Source: https://github.com/wsdltophp/packagegenerator/blob/develop/README.md Add the package as a development dependency to your project. ```bash composer require wsdltophp/packagegenerator --dev ``` -------------------------------- ### Usage of generated SoapHeader setter Source: https://github.com/wsdltophp/packagegenerator/wiki/FAQ Example showing how to initialize the service and apply the required SoapHeader before executing an operation. ```php $options = array( \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => 'PayPalSvc.wsdl', \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_CLASSMAP => ClassMap::get(), ); /** * Samples for Refund ServiceType */ $refund = new \ServiceType\Refund($options); $requesterCredentials = new \StructType\CustomSecurityHeaderType(/* parameters */); $refund->setSoapHeaderRequesterCredentials($requesterCredentials); /** * Sample call for RefundTransaction operation/method */ if ($refund->RefundTransaction(new \StructType\RefundTransactionReq()) !== false) { print_r($refund->getResult()); } else { print_r($refund->getLastError()); } ``` -------------------------------- ### Generate multiple packages with shared namespaces Source: https://github.com/wsdltophp/packagegenerator/wiki/FAQ Example commands for generating multiple packages with specific namespaces and destinations, setting --standalone to false to allow manual composer.json configuration. ```shell $ # first package $ ./wsdltophp.phar [...] --namespace="Provider1/Service1" --destination="Provider1/Service1" --standalone=false $ # second package $ ./wsdltophp.phar [...] --namespace="Provider1/Service2" --destination="Provider1/Service2" --standalone=false $ # third package $ ./wsdltophp.phar [...] --namespace="Provider2/Service1" --destination="Provider2/Service1" --standalone=false $ # fourth package $ ./wsdltophp.phar [...] --namespace="Provider2/Service2" --destination="Provider2/Service2" --standalone=false ``` -------------------------------- ### Generated PHP Doc block example Source: https://github.com/wsdltophp/packagegenerator/wiki/Options The resulting PHP Doc block structure after applying the addcomments configuration. ```php /** * This class stands for Add ServiceType * @package Ews * @subpackage Services * @date 2017/06/21 * @codeVersion 1.3.2 * This has been generated from server 01 */ ``` -------------------------------- ### Execute commands in Docker container Source: https://github.com/wsdltophp/packagegenerator/blob/develop/README.md Commands to install dependencies and run tests within the 'package_generator' container. ```bash # install deps in container (using update ensure it does use the composer.lock file if there is any) $ make update # run tests in container $ make phpunit ``` -------------------------------- ### Fluent Setter Chaining Source: https://github.com/wsdltophp/packagegenerator/blob/develop/MANIFEST.md Example of using fluent setters to chain property assignments on a struct object. ```php $object->setFirstname('Bob')->setLastname('Barfield') ``` -------------------------------- ### Add class comments via CLI Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Example of using the addcomments command line option to inject annotations and descriptions into generated class PHP Doc blocks. ```bash $ wsdltophp --addcomments="date:2017/06/21" \ --addcomments="codeVersion:1.3.2" \ --addcomments="This has been generated from server 01" ``` -------------------------------- ### WSDL operation definition for SoapHeaders Source: https://github.com/wsdltophp/packagegenerator/wiki/FAQ Example of a WSDL operation definition that triggers automatic detection of required SoapHeaders. ```xml ``` -------------------------------- ### Add class comments via PHP methods Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Example of using setAddComments or setOptionAddComments to programmatically inject annotations into generated classes. ```php /* @var GeneratorOptions $options */ $options->setAddComments([ "date" => date("Y/m/d"), "codeVersion" => "1.3.2", "This has been generated from server 01", ]); /* @var Generator $generator */ $generator->setOptionAddComments([ "date" => date("Y-m-d"), "codeVersion" => "1.3.2", "This has been generated from server 01", ]); ``` -------------------------------- ### PHP validation constraint: itemType Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Example of a setter method validating that an array contains only string items. ```php // an array of string is expected public function setEntry(array $entry = array()) { foreach ($entry as $additionalEntriesEntryItem) { // validation for constraint: itemType if (!is_string($additionalEntriesEntryItem)) { throw new \InvalidArgumentException(sprintf('The Entry property can only contain items of string, "%s" given', is_object($additionalEntriesEntryItem) ? get_class($additionalEntriesEntryItem) : gettype($additionalEntriesEntryItem)), __LINE__); } } $this->Entry = $entry; return $this; } ``` -------------------------------- ### WSDL enumeration schema declaration Source: https://github.com/wsdltophp/packagegenerator/wiki/Options An example of an XML simpleType definition representing an enumeration in a WSDL or schema file. ```xml ``` -------------------------------- ### PHP validation constraint: minLength Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Example of a setter method implementing a minimum length validation constraint for an IM address. ```php // a string is expected to be 1 character length at least public function setImAddress($imAddress = null) { // validation for constraint: minLength if ((is_scalar($imAddress) && strlen($imAddress) < 1) || (is_array($imAddress) && count($imAddress) < 1)) { throw new \InvalidArgumentException('Invalid length, please provide an array with 1 element(s) or a scalar of 1 character(s) at least', __LINE__); } // validation for constraint: string if (!is_null($imAddress) && !is_string($imAddress)) { throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($imAddress)), __LINE__); } $this->ImAddress = $imAddress; return $this; } ``` -------------------------------- ### PHP validation constraint: pattern Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Example of a setter method validating that a string matches a specific regex pattern. ```php // a string is expected to match the pattern public function setPersonId($personId = null) { // validation for constraint: pattern if (is_scalar($personId) && !preg_match('/[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/', $personId)) { throw new \InvalidArgumentException(sprintf('Invalid value, please provide a scalar value that matches "[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}", "%s" given', var_export($personId, true)), __LINE__); } // validation for constraint: string if (!is_null($personId) && !is_string($personId)) { throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($personId)), __LINE__); } $this->PersonId = $personId; return $this; } ``` -------------------------------- ### PHP validation constraint: enumeration Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Example of a setter method validating that a value belongs to a specific enumeration class. ```php // an enumeration value is exepected from the \Ews\EnumType\EwsMonthNamesType constant class public function setMonth($month = null) { // validation for constraint: enumeration if (!\Ews\EnumType\EwsMonthNamesType::valueIsValid($month)) { throw new \InvalidArgumentException(sprintf('Value "%s" is invalid, please use one of: %s', $month, implode(', ', \Ews\EnumType\EwsMonthNamesType::getValidValues())), __LINE__); } $this->Month = $month; return $this; } ``` -------------------------------- ### Usage of command line options Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Demonstrates how to use a command line option by prefixing the option name with '--'. ```bash $ wsdltophp --composer-name="my/sdk" ``` -------------------------------- ### Generate package with Basic Authentication Source: https://github.com/wsdltophp/packagegenerator/wiki/FAQ Use the --login and --password flags with the generate:package command to authenticate against a protected WSDL. ```bash $ wget https://phar.wsdltophp.com/wsdltophp.phar $ ./wsdltophp.phar generate:package \ --urlorpath="http://www.mydomain.com/wsdl.xml" \ --destination="/path/to/where/the/package/must/be/generated/" \ --prefix="MyPackage" \ ############################################### # Here are the Basic Authentication credentials --login="basic_auth_login" \ --password="basic_auth_password" \ ############################################### --force ``` -------------------------------- ### Generate Package via Command Line Source: https://github.com/wsdltophp/packagegenerator/blob/develop/README.md Use the CLI tool to generate a package from a WSDL URL. ```bash $ wsdltophp generate:package \ --urlorpath="http://developer.ebay.com/webservices/latest/ebaySvc.wsdl" \ --destination="./MySdk" \ --composer-name="myproject/mysdk" \ --force ``` -------------------------------- ### Build Docker container Source: https://github.com/wsdltophp/packagegenerator/blob/develop/README.md Command to initialize the development container using docker-compose from the project root. ```bash $ make build up ``` -------------------------------- ### Generate Package via Docker Source: https://github.com/wsdltophp/packagegenerator/blob/develop/README.md Run the generator in a Docker container, mounting the current directory to output the generated SDK. ```bash $ docker run --rm -it --volume $PWD:/var/www mikaelcom/wsdltophp:tagname generate:package \ --urlorpath="http://developer.ebay.com/webservices/latest/ebaySvc.wsdl" \ --destination="/var/www/MySdk" \ --composer-name="myproject/mysdk" \ --force ``` -------------------------------- ### Call SOAP service with Basic Authentication Source: https://github.com/wsdltophp/packagegenerator/wiki/FAQ Configure the AbstractSoapClientBase options array with WSDL_LOGIN and WSDL_PASSWORD to authenticate during service calls. ```php use WsdlToPhp\PackageBase\AbstractSoapClientBase; $options = array( AbstractSoapClientBase::WSDL_URL => 'http://www.mydomain.com/wsdl.xml', AbstractSoapClientBase::WSDL_CLASSMAP => \MyPackage\MyPackageClassMap::get(), ############################################### # Here are the Basic Authentication credentials AbstractSoapClientBase::WSDL_LOGIN => 'basic_auth_login', AbstractSoapClientBase::WSDL_LOGIN => 'basic_auth_password', ############################################### ); ``` -------------------------------- ### Configure composer settings via CLI Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Use the --composer-settings flag to pass configuration keys and values using a dot-notation string format. ```bash # take attention to the notation which is a sort of JSON notation such as path.to.the.section.key:value $ wsdltophp --composer-settings="config.disable-tls:true" \ --composer-settings="require.wsdltophp/wssecurity:~1.0" ``` -------------------------------- ### Run via Docker Source: https://github.com/wsdltophp/packagegenerator/blob/develop/README.md Execute the generator using the official Docker image. ```bash $ docker run --rm -it mikaelcom/wsdltophp:tagname ``` -------------------------------- ### Configure proxy settings for CLI generation Source: https://github.com/wsdltophp/packagegenerator/wiki/FAQ Command line arguments for the wsdltophp generator to handle WSDL access through a proxy server. ```shell $ wget https://phar.wsdltophp.com/wsdltophp.phar $ ./wsdltophp.phar generate:package \ --urlorpath="http://www.mydomain.com/wsdl.xml" \ --destination="/path/to/where/the/package/must/be/generated/" \ --prefix="MyPackage" \ ############################# # Here are the proxy settings --proxy-host="my.proxy.cache.proxy" \ --proxy-port=7552 \ --proxy-login="my_proxy_login" \ --proxy-password="my_proxy_password" \ ############################# --force ``` -------------------------------- ### Configure proxy settings for SOAP client Source: https://github.com/wsdltophp/packagegenerator/wiki/FAQ PHP array configuration for AbstractSoapClientBase to enable proxy support when calling a SOAP web service. ```php use WsdlToPhp\PackageBase\AbstractSoapClientBase; $options = array( AbstractSoapClientBase::WSDL_URL => 'http://www.mydomain.com/wsdl.xml', AbstractSoapClientBase::WSDL_CLASSMAP => \MyPackage\MyPackageClassMap::get(), ############################# # Here are the proxy settings AbstractSoapClientBase::WSDL_PROXY_HOST => 'my.proxy.cache.proxy', AbstractSoapClientBase::WSDL_PROXY_PORT => 7552, AbstractSoapClientBase::WSDL_PROXY_LOGIN=> 'my_proxy_login', AbstractSoapClientBase::WSDL_PROXY_PASSWORD => 'my_proxy_password', ############################# ); ``` -------------------------------- ### Configure composer settings via PHP methods Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Set composer settings using either an array of dot-notation strings or a structured associative array. ```php /* @var GeneratorOptions $options */ $options->setComposerSettings([ "config.disable-tls:true", "require.wsdltophp/wssecurity:~1.0", ]); /* @var Generator $generator */ // This is another way to pass the settings which can be passed to the $options->setComposerSettings() method too $generator->setOptionComposerSettings([ "config" => [ "disable-tls" => true, ], "require" => [ "wsdltophp/wssecurity" => "~1.0", ], ]); ``` -------------------------------- ### Set custom HTTP headers using setHttpHeader Source: https://github.com/wsdltophp/packagegenerator/wiki/FAQ Demonstrates instantiating a service class and applying custom HTTP headers before executing a service operation. ```php $options = array( \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => 'PayPalSvc.wsdl', \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_CLASSMAP => ClassMap::get(), ); /** * Samples for Refund ServiceType */ $refund = new \ServiceType\Refund($options); $requesterCredentials = new \StructType\CustomSecurityHeaderType(/*[...])*/); $refund->setSoapHeaderRequesterCredentials($requesterCredentials); $refund->setHttpHeader('X-HEADER', 'X-HEADER-VALUE'); $refund->setHttpHeader('X-TOKEN', 'X-TOKEN-VALUE'); /** * Sample call for RefundTransaction operation/method */ if ($refund->RefundTransaction(new \StructType\RefundTransactionReq()) !== false) { print_r($refund->getResult()); } else { print_r($refund->getLastError()); } ``` -------------------------------- ### Authentication Options Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Methods to configure Basic HTTP Authentication for WSDL access. ```APIDOC ## Basic Authentication Configuration ### Methods - $options->setBasicLogin(string $login) - $generator->setOptionBasicLogin(string $login) - $options->setBasicPassword(string $password) - $generator->setOptionBasicPassword(string $password) ### Command Line Options - --login - --password ``` -------------------------------- ### Configuration Methods Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Methods to configure the generation paths and namespace behavior for the PackageGenerator. ```APIDOC ## Configuration Methods ### setArraysFolder(string $folder) Sets the directory for generated Array classes. ### setEnumsFolder(string $folder) Sets the directory for generated Enum classes. ### setServicesFolder(string $folder) Sets the directory for generated Service classes. ### setNamespaceDictatesDirectories(bool $namespaceDictatesDirectories) Configures whether the namespace structure dictates the directory structure for generated classes. ``` -------------------------------- ### Run PHPUnit tests Source: https://github.com/wsdltophp/packagegenerator/blob/develop/README.md Commands to execute the full test suite or specific test suites using PHPUnit. ```bash # launch all tests $ phpunit # launch a testsuite: command, configuration, utils, model, container, parser, file, packagegenerator $ phpunit --testsuite=model ``` -------------------------------- ### Generate Package in PHP Project Source: https://github.com/wsdltophp/packagegenerator/blob/develop/README.md Configure the generator options and trigger package generation within a PHP script. ```php use WsdlToPhp\PackageGenerator\ConfigurationReader\GeneratorOptions; use WsdlToPhp\PackageGenerator\Generator\Generator; // Options definition: the configuration file parameter is optional $options = GeneratorOptions::instance(/* '/path/file.yml' */); $options ->setOrigin('http://developer.ebay.com/webservices/latest/ebaySvc.wsdl') ->setDestination('./MySdk') ->setComposerName('myproject/mysdk'); // Generator instantiation $generator = new Generator($options); // Package generation $generator->generatePackage(); ``` -------------------------------- ### Class Naming Options Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Methods to configure prefixes and suffixes for generated classes. ```APIDOC ## Class Naming Configuration ### Methods - $options->setPrefix(string $prefix) - $generator->setOptionPrefix(string $prefix) - $options->setSuffix(string $suffix) - $generator->setOptionSuffix(string $suffix) ### Command Line Options - --prefix - --suffix ``` -------------------------------- ### Proxy Settings Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Methods to configure proxy server connectivity. ```APIDOC ## Proxy Configuration ### Methods - $options->setProxyHost(string $host) - $generator->setOptionProxyHost(string $host) - $options->setProxyPort(string $port) - $generator->setOptionProxyPort(string $port) - $options->setProxyLogin(string $login) - $generator->setOptionProxyLogin(string $login) - $options->setProxyPassword(string $password) - $generator->setOptionProxyPassword(string $password) ### Command Line Options - --proxy-host - --proxy-port - --proxy-login - --proxy-password ``` -------------------------------- ### Generated Project Directory Structure Source: https://github.com/wsdltophp/packagegenerator/blob/develop/MANIFEST.md The expected file and folder structure after a successful generation process. ```markdown {destination} |──── src # can be removed if necessary, read src-dirname option |─────|──── ArrayType # generated only if Array Structs are declared |─────|──── | .... |──── EnumType # generated only if Enumerations are declared |─────| .... |──── ServiceType # contains ServiceType classes |─────| .... |──── StructType # contains Struct classes, used to construct request parameters |─────| .... |──── ClassMap.php # generated in order to map generated Struct classes to Soap Structs |──── vendor # generated by composer if standalone option is enabled, true by default |──── | .... |──── composer.json # generated if standalone option is enabled, true by default |──── composer.lock # generated by composer if standalone option is enabled, true by default |──── tutorial.php # generated if gentutorial option is enabled, true by default ``` -------------------------------- ### Configure Generator with Custom Options File Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Use the GeneratorOptions class to load a custom YAML configuration file and pass it to the Generator instance. ```php // Create an instance with your configuration file $options = GeneratorOptions::instance("/path/my_generator_options_for_this_package.yml"); // Pass the instance to the generator $generator = new Generator($options); ``` -------------------------------- ### Directory Structure Options Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Methods to customize the generated directory structure and class organization. ```APIDOC ## Directory Structure Configuration ### Methods - $options->setSrcDirname(string $name) - $generator->setOptionSrcDirname(string $name) - $options->setCategory(string $category) - $generator->setOptionCategory(string $category) - $options->setStructsFolder(string $folder) - $generator->setOptionStructsFolder(string $folder) ### Command Line Options - --src-dirname - --category - --structs-folder ``` -------------------------------- ### Accessing SoapClient in version 2.* Source: https://github.com/wsdltophp/packagegenerator/blob/develop/UPGRADE-3.0.md Previously, the SoapClient instance was accessed using the static method self::getSoapClient(). ```php 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; } } } ``` -------------------------------- ### Configure composer.json for multiple packages Source: https://github.com/wsdltophp/packagegenerator/wiki/FAQ The autoload configuration required in your composer.json to map the generated namespaces to their respective source directories. ```json "autoload": { "psr-4": { "Provider1\\Service1\\": "./Provider1/Service1/src/", "Provider1\\Service1\\": "./Provider1/Service2/src/", "Provider2\\Service1\\": "./Provider2/Service1/src/", "Provider2\\Service2\\": "./Provider2/Service2/src/" } } ``` -------------------------------- ### Generated composer.json output Source: https://github.com/wsdltophp/packagegenerator/wiki/Options The resulting composer.json structure after applying the specified composer settings. ```json { "name": "wsdltophp/ews", "description": "Package generated from main.wsdl using wsdltophp/packagegenerator", "require": { "php": ">=5.3.3", "ext-soap": "*", "wsdltophp/packagebase": "~1.0", "wsdltophp/wssecurity": "~1.0" }, "autoload": { "psr-4": { "": "./src/" } }, "config": { "disable-tls": true } } ``` -------------------------------- ### Accessing SoapClient in version 3.* Source: https://github.com/wsdltophp/packagegenerator/blob/develop/UPGRADE-3.0.md In version 3.0, the SoapClient instance is accessed using the instance method $this->getSoapClient(). ```php 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; } } } ``` -------------------------------- ### Generator dry-run output Source: https://github.com/wsdltophp/packagegenerator/wiki/Options The default output displayed when the force option is not provided, showing the current configuration without launching the generation process. ```text Start at 2016-11-30 01:15:12 Generation not launched, use "--force" option to force generation Generator's option file used: /path/to/your/configuration/file.yml Used generator's options: category: "cat" gather_methods: "start" generic_constants_names: false generate_tutorial_file: true add_comments: {"date":"2015-04-22","author":"Me","release":"1.1.0","team":"Dream"} namespace_prefix: "My\\Project" standalone: true validation: true struct_class: "\\Std\\Opt\\StructClass" struct_array_class: "\\Std\\Opt\\StructArrayClass" soap_client_class: "\\Std\\Opt\\SoapClientClass" origin: "http:\/\/developer.ebay.com\/webservices\/latest\/ebaySvc.wsdl" destination: "\/var\/www\/Api\/" src_dirname: "SoapClient" prefix: "Api" suffix: "Project" basic_login: "*******" basic_password: "*******" proxy_host: "****************************" proxy_port: "*******" proxy_login: "*******" proxy_password: "*******" soap_options: [] composer_name: "wsdltophp\/package" composer_settings: {"config":{"disable-tls":true},"require":{"wsdltophp\/wssecurity":"dev-master"}} structs_folder: "Structs" arrays_folder: "Arrays" enums_folder: "Enums" services_folder: "Services" End at 2016-11-30 01:15:12, duration: 00:00:00 ``` -------------------------------- ### Configure XSD Types Mapping via PHP Source: https://github.com/wsdltophp/packagegenerator/wiki/Options Set a custom XSD types mapping file path on the GeneratorOptions instance to influence property and parameter annotations. ```php // Create an instance with your configuration file $options = (GeneratorOptions::instance()) ->setXsdTypesPath('/path/to/the/xsd/types/file.yml'); // Pass the instance to the generator $generator = new Generator($options); ``` -------------------------------- ### Customized generic PHP constants class Source: https://github.com/wsdltophp/packagegenerator/wiki/Options The output class generated when genericconstants is enabled, using generic constant names. ```php namespace Ews\EnumType; class EwsExchangeVersionType { /** * Constant for value 'Exchange2007' * @return string 'Exchange2007' */ const ENUM_VALUE_1 = 'Exchange2007'; /** * Constant for value 'Exchange2007_SP1' * @return string 'Exchange2007_SP1' */ const ENUM_VALUE_2 = 'Exchange2007_SP1'; /** * Constant for value 'Exchange2010' * @return string 'Exchange2010' */ const ENUM_VALUE_3 = 'Exchange2010'; /** * Constant for value 'Exchange2010_SP1' * @return string 'Exchange2010_SP1' */ const ENUM_VALUE_4 = 'Exchange2010_SP1'; /** * Constant for value 'Exchange2010_SP2' * @return string 'Exchange2010_SP2' */ const ENUM_VALUE_5 = 'Exchange2010_SP2'; /** * Constant for value 'Exchange2013' * @return string 'Exchange2013' */ const ENUM_VALUE_6 = 'Exchange2013'; /** * Constant for value 'Exchange2013_SP1' * @return string 'Exchange2013_SP1' */ const ENUM_VALUE_7 = 'Exchange2013_SP1'; /** * Constant for value 'Exchange2015' * @return string 'Exchange2015' */ const ENUM_VALUE_7 = 'Exchange2015'; /** * Constant for value 'V2_47' * @return string 'V2_47' */ const ENUM_VALUE_8 = 'V2_47'; ... ``` -------------------------------- ### Default generated PHP constants class Source: https://github.com/wsdltophp/packagegenerator/wiki/Options The default output class generated when genericconstants is set to false, using descriptive constant names. ```php namespace Ews\EnumType; class EwsExchangeVersionType { /** * Constant for value 'Exchange2007' * @return string 'Exchange2007' */ const VALUE_EXCHANGE_2007 = 'Exchange2007'; /** * Constant for value 'Exchange2007_SP1' * @return string 'Exchange2007_SP1' */ const VALUE_EXCHANGE_2007_SP_1 = 'Exchange2007_SP1'; /** * Constant for value 'Exchange2010' * @return string 'Exchange2010' */ const VALUE_EXCHANGE_2010 = 'Exchange2010'; /** * Constant for value 'Exchange2010_SP1' * @return string 'Exchange2010_SP1' */ const VALUE_EXCHANGE_2010_SP_1 = 'Exchange2010_SP1'; /** * Constant for value 'Exchange2010_SP2' * @return string 'Exchange2010_SP2' */ const VALUE_EXCHANGE_2010_SP_2 = 'Exchange2010_SP2'; /** * Constant for value 'Exchange2013' * @return string 'Exchange2013' */ const VALUE_EXCHANGE_2013 = 'Exchange2013'; /** * Constant for value 'Exchange2013_SP1' * @return string 'Exchange2013_SP1' */ const VALUE_EXCHANGE_2013_SP_1 = 'Exchange2013_SP1'; /** * Constant for value 'Exchange2015' * @return string 'Exchange2015' */ const VALUE_EXCHANGE_2015 = 'Exchange2015'; /** * Constant for value 'V2_47' * @return string 'V2_47' */ const VALUE_V_2_47 = 'V2_47'; ... ``` -------------------------------- ### Generated SoapHeader setter method Source: https://github.com/wsdltophp/packagegenerator/wiki/FAQ The generated PHP method used to set a specific SoapHeader, utilizing AbstractSoapClientBase::setSoapHeader(). ```php /** * Sets the RequesterCredentials SoapHeader param * @uses AbstractSoapClientBase::setSoapHeader() * @param \StructType\CustomSecurityHeaderType $requesterCredentials * @param string $nameSpace * @param bool $mustUnderstand * @param string $actor * @return bool */ public function setSoapHeaderRequesterCredentials(\StructType\CustomSecurityHeaderType $requesterCredentials, $nameSpace = 'urn:ebay:api:PayPalAPI', $mustUnderstand = false, $actor = null) { return $this->setSoapHeader($nameSpace, 'RequesterCredentials', $requesterCredentials, $mustUnderstand, $actor); } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.