Class WsdlToPhpGenerator

Description

Class WsdlToPhpGenerator This class replaces the original WsdlToPhp class.

It uses the WsdlToPhpModel's classes (WsdlToPhpStruct, WsdlToPhpService, WsdlToPhpFunction, WsdlToPhpStructAttribute, WsdlToPhpStructValue) in order to rationalize informations. From now, each class is clearly identified depending on its behaviour :

  • {PackageName}Service* : class which gathers the operations/functions (based on their name)
  • {PackageName}Struct* : class which represents a struct type which can be used either for requesting or catching response
  • {PackageName}Enum* : class which represents an enumeration of values. Each value is defined with a constant
  • {PackageName}WsdlClass : mother class of all generated class if enabled. This class defines all the generic methods and the needed configurations/methods to call the SOAP WS
  • {PackageName}ClassMap : class that constains one final public static method which returns the array to map structs/enums to generated classes
Test case examples

Located in /WsdlToPhpGenerator.php (line 294)

SoapClient
   |
   --WsdlToPhpGenerator
Class Constant Summary
 OPT_ADD_COMMENTS = 'option_add_comments_key'
 OPT_CAT_KEY = 'option_category_key'
 OPT_DEBUG = 'option_debug'
 OPT_GATH_METH_KEY = 'option_gather_methods_key'
 OPT_GENERIC_CONSTANTS_NAMES_KEY = 'option_generic_constants_names_key'
 OPT_GEN_AUTOLOAD_KEY = 'option_generate_autaload_file_key'
 OPT_GEN_TUTORIAL_KEY = 'option_generate_tutorial_file_key'
 OPT_GEN_WSDL_CLASS_KEY = 'option_generate_wsdl_class_key'
 OPT_INHERITS_FROM_IDENTIFIER_KEY = 'option_inherits_from_identifier_key'
 OPT_RESPONSE_AS_WSDL_OBJECT_KEY = 'option_response_as_wsdl_object_key'
 OPT_SEND_PARAMETERS_AS_ARRAY_KEY = 'option_send_parameters_as_array_key'
 OPT_SEND_PARAM_AS_ARRAY_KEY = 'option_send_param_as_array_key'
 OPT_SUB_CAT_KEY = 'option_sub_category_key'
 WSDL_TO_PHP_GENERATOR_AUDIT_KEY = '__WsdlToPhpGeneratorAuditKey__'
 WSDL_TO_PHP_GENERATOR_GLOBAL_KEY = '__WsdlToPhpGeneratorGlobalKey__'
Variable Summary
Method Summary
 static bool audit (string $_auditName, [string $_auditElement = ''], [int $_spentTime = 0], [bool $_createOnly = false])
 static bool auditInit (string $_auditName, [string $_auditElement = ''])
 static DOMNodeList executeDomXPathQuery (DOMDocument $_domDocument, string $_query)
 static DOMElement|null findSuitableParent (DOMNode $_domNode, [bool $_checkName = true], [array $_parentTags = array()], [int $_maxDeep = 5])
 static void generateAutoloadFile (string $_rootDirectory, [array $_classesFiles = array()])
 static array getAudit ()
 static mixed getGlobal (scalar $_globalKey, [mixed $_globalFallback = null])
 static array getOptionAddComments ()
 static int getOptionCategory ()
 static bool getOptionDebug ()
 static int getOptionGatherMethods ()
 static int getOptionSubCategory ()
 static string getPackageName ([bool $_ucFirst = true])
 static bool initGlobals ()
 static void populateFile (string $_fileName, array $_declarations)
 static mixed setGlobal (scalar $_globalKey, mixed $_globalValue)
 static array setOptionAddComments ([array $_optionAddComments = array()])
 static bool setOptionCategory ([int $_optionCategory = self::OPT_CAT_START_NAME])
 static bool setOptionDebug ([bool $_optionDebug = false])
 static bool setOptionGatherMethods ([int $_optionGatherMethods = self::OPT_GATH_METH_START_NAME])
 static bool setOptionGenerateAutoloadFile ([bool $_optionGenerateAutoloadFile = false])
 static bool setOptionGenerateTutorialFile ([bool $_optionGenerateTutorialFile = false])
 static bool setOptionGenerateWsdlClassFile ([bool $_optionGenerateWsdlClassFile = false])
 static bool setOptionGenericConstantsNames ([bool $_optionGenericConstantsNames = false])
 static string setOptionInheritsClassIdentifier ([string $_optionInheritsClassIdentifier = ''])
 static bool setOptionResponseAsWsdlObject ([bool $_optionResponseAsWsdlObject = false])
 static bool setOptionSendArrayAsParameter ([bool $_optionSendArrayAsParameter = false])
 static bool setOptionSendParametersAsArray ([bool $_optionSendParametersAsArray = false])
 static bool setOptionSubCategory ([int $_optionSubCategory = self::OPT_SUB_CAT_START_NAME])
 static string setPackageName (string $_packageName)
 static bool unsetGlobals ()
 static DOMDocument|null wsdlLocationToDomDocument (string $_wsdlLocation)
 void addRestrictionValue (string $_structName, mixed $_value)
 void addService (string $_functionName, string $_functionParameter, string $_functionReturn)
 void addServiceFunctionMeta (string $_functionName, string $_functionInfoName, string $_functionInfoValue)
 void addStruct (string $_structName, string $_attributeName, string $_attributeType)
 void addStructAttributeMeta (string $_structName, string $_attributeName, string $_attributeInfoName, mixed $_attributeInfoValue)
 void addStructMeta (string $_structName, string $_structInfoName, mixed $_structInfoValue)
 void addVirtualStruct (string $_structName)
 void addWsdl (string $_wsdlLocation)
 string addWsdlMeta (string $_metaName, mixed $_metaValue)
 bool generateClasses (string $_packageName, string $_rootDirectory, [int $_rootDirectoryRights = 0775], [bool $_createRootDirectory = true])
 array generateClassMap (string $_rootDirectory)
 array generateServicesClasses (string $_rootDirectory, int $_rootDirectoryRights)
 void generateStructsClasses (string $_rootDirectory, int $_rootDirectoryRights)
 bool generateTutorialFile (string $_rootDirectory, [array $_functionsClassesFiles = array()])
 array generateWsdlClassFile (string $_rootDirectory)
 string getCategory (WsdlToPhpModel $_model)
 string getDirectory (string $_rootDirectory, int $_rootDirectoryRights, WsdlToPhpModel $_model)
 string getGather (WsdlToPhpModel $_model)
 string getPart (WsdlToPhpModel $_model, string $_optionName)
 WsdlToPhpService|null getService (string $_serviceName)
 WsdlToPhpFunction|null getServiceFunction (string $_functionName, mixed $_functionParameter)
 string getServiceName (string $_functionName)
 array getServices ()
 WsdlToPhpStruct|null getStruct (string $_structName)
 WsdlToPhpStructAttribute|null getStructAttribute (string $_structName, string $_attributeName)
 array getStructs ()
 WsdlToPhpStructValue|null getStructValue (string $_structName, string $_valueName)
 string getSubCategory (WsdlToPhpModel $_model)
 string|null getWsdl (int $_index)
 array getWsdls ()
 bool initServices ()
 bool initStructs ()
 void loadWsdls ([string $_wsdlLocation = ''], [DOMNode $_domNode = null], [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
 void manageWsdlLocation (string $_wsdlLocation, DOMNode $_domNode, string $_fromWsdlLocation, [string $_nodeNameMatch = null])
 void manageWsdlNode ([string $_wsdlLocation = ''], [DOMNode $_domNode = null], [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
 void manageWsdlNodeAttribute ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
 void manageWsdlNodeDocumentation ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''])
 void manageWsdlNodeElement ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''])
 void manageWsdlNodeEnumeration ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''])
 void manageWsdlNodeExtension ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''])
 void manageWsdlNodeHeader ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
 void manageWsdlNodeImport ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''])
 void manageWsdlNodeInput ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
 void manageWsdlNodeInputOutput ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
 void manageWsdlNodeList ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
 void manageWsdlNodeOutput ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
 void manageWsdlNodeRestriction ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''])
 boolean manageWsdlNodeUndefined ([string $_wsdlLocation = ''], [DOMNode $_domNode = null], [string $_fromWsdlLocation = ''])
 void manageWsdlNodeUnion ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
 WsdlToPhpGenerator __construct (string $_pathToWsdl, [string $_login = false], [string $_password = false], [array $_options = array()], [array $_wsdlOptions = array()])
 void setServiceFunctionDocumentation (string $_functionName, string $_documentation)
 array setServices ([array $_services = array()])
 void setStructAttributeDocumentation (string $_structName, string $_attributeName, string $_documentation)
 void setStructDocumentation (string $_structName, string $_documentation)
 void setStructInheritance (string $_structName, string $_inherits)
 void setStructIsRestriction (string $_structName)
 void setStructIsStruct (string $_structName)
 array setStructs ([array $_structs = array()])
 void setStructValueDocumentation (string $_structName, string $_valueName, string $_documentation)
 array setWsdls ([array $_wsdls = array()])
 void wsdlsLoaded ()
 string __toString ()
Variables
static array $globals (line 523)

Use intern global variable instead of using the PHP $GLOBALS variable

  • access: private
static array $optionAddComments (line 513)

Option to set additional PHP doc block tags to every generated file and class

  • access: private
static int $optionCategory (line 458)

Option to categorize classes

  • access: private
static bool $optionDebug (line 518)

Option to set debug

  • access: private
static int $optionGatherMethods (line 468)

Option to define how to gather methods by classes

  • access: private
static bool $optionGenerateAutoloadFile (line 478)

Option to enabled/disable autoload file generation

  • access: private
static bool $optionGenerateTutorialFile (line 508)

Option to enabled/disable tutorial file generation

  • access: private
static bool $optionGenerateWsdlClassFile (line 483)

Option to enabled/disable wsdl class file generation

  • access: private
static string $optionGenericConstantsNames (line 503)

Option to set set the generation of contants names based on the enumeration name with an incremental value

  • access: private
static string $optionInheritsClassIdentifier (line 498)

Option to set string that points bases classes from which some classes inherits

  • access: private
static bool $optionResponseAsWsdlObject (line 488)

Option to enable/disable encapsulation of response or not in the response class

  • access: private
static bool $optionSendArrayAsParameter (line 473)

Option to set that parameters to soap call must be contained by an array where indexex are the parameters name

  • access: private
static bool $optionSendParametersAsArray (line 493)

Option to enable/disable encapsulation of request in array with 'parameters' as main index

  • access: private
static int $optionSubCategory (line 463)

Option to subcategorize classes

  • access: private
static string $packageName (line 448)

Name of the package to use

  • access: private
array $services (line 443)

Services arrays

  • access: private
array $structs (line 438)

Structs array

  • access: private
array $wsdls (line 453)

Wsdl lists

  • access: private
Methods
static audit (line 3489)

Method to store audit timing during the process

static bool audit (string $_auditName, [string $_auditElement = ''], [int $_spentTime = 0], [bool $_createOnly = false])
  • string $_auditName: the type of audit (parsing, generating, etc..). If audit name is parsing_DOM, than parsing is created to cumulate time for all parsing processes
  • string $_auditElement: audit specific element
  • int $_spentTime: already spent time on the current audit category (and element)
  • bool $_createOnly: indicates if the element must be only created or not
static executeDomXPathQuery (line 3197)

Execute query on DOMDocument using DOMXPath

static DOMNodeList executeDomXPathQuery (DOMDocument $_domDocument, string $_query)
  • DOMDocument $_domDocument: the DOMDocument to execute the query on
  • string $_query: the query to execute
static findSuitableParent (line 3176)

Finds the suitable parent node of the current node in maximum 5 parents

Centralize method to find a valid parent

static DOMElement|null findSuitableParent (DOMNode $_domNode, [bool $_checkName = true], [array $_parentTags = array()], [int $_maxDeep = 5])
  • DOMNode $_domNode
  • bool $_checkName: whether to validate the attribute named "name" or not
  • array $_parentTags: parent tags name to fit a parent tag
  • int $_maxDeep: max deep of this current node
static generateAutoloadFile (line 1180)

Generates autoload file for all classes.

The classes are loaded automatically in order of their dependency regarding their inheritance (defined in WsdlToPhpGenerate::generateStructsClasses() method).

static void generateAutoloadFile (string $_rootDirectory, [array $_classesFiles = array()])
  • string $_rootDirectory: the directory
  • array $_classesFiles: the generated classes files
static getAudit (line 3588)

Returns the audit informations

static array getAudit ()
static getGlobal (line 3468)

Gets a global value

static mixed getGlobal (scalar $_globalKey, [mixed $_globalFallback = null])
  • scalar $_globalKey: the index where to store the data in the global array dedicated the the class
  • mixed $_globalFallback: the fallback value
static getOptionAddComments (line 1954)

Gets the optionAddComments value

static array getOptionAddComments ()
static getOptionCategory (line 1726)

Sets the optionCategory value

static int getOptionCategory ()
static getOptionDebug (line 1971)

Gets the debug mode value

static bool getOptionDebug ()
static getOptionGatherMethods (line 1786)

Sets the optionGatherMethods value

static int getOptionGatherMethods ()
static getOptionGenerateAutoloadFile (line 1832)

Gets the optionGenerateAutoloadFile value

static bool getOptionGenerateAutoloadFile ()
static getOptionGenerateTutorialFile (line 1937)

Gets the optionGenerateTutorialFile value

static bool getOptionGenerateTutorialFile ()
static getOptionGenerateWsdlClassFile (line 1849)

Gets the optionGenerateWsdlClassFile value

static bool getOptionGenerateWsdlClassFile ()
static getOptionGenericConstantsNames (line 1920)

Gets the optionGenericConstantsNames value

static bool getOptionGenericConstantsNames ()
static getOptionInheritsClassIdentifier (line 1903)

Gets the optionInheritsClassIdentifier value

static string getOptionInheritsClassIdentifier ()
static getOptionResponseAsWsdlObject (line 1866)

Gets the optionResponseAsWsdlObject value

static bool getOptionResponseAsWsdlObject ()
static getOptionSendArrayAsParameter (line 1815)

Gets the optionSendArrayAsParameter value

static bool getOptionSendArrayAsParameter ()
static getOptionSendParametersAsArray (line 1883)

Gets the optionResponseAsWsdlObject value

static bool getOptionSendParametersAsArray ()
static getOptionSubCategory (line 1756)

Sets the optionSubCategory value

static int getOptionSubCategory ()
static getPackageName (line 1989)

Gets the package name

static string getPackageName ([bool $_ucFirst = true])
  • bool $_ucFirst: ucfirst package name or not
static initGlobals (line 3429)

Inits global array dedicated to the class

static bool initGlobals ()
static populateFile (line 1051)

Populate the php file with the object and the declarations

static void populateFile (string $_fileName, array $_declarations)
  • string $_fileName: the file name
  • array $_declarations: the lines of code and comments
static setGlobal (line 3452)

Sets a global value

static mixed setGlobal (scalar $_globalKey, mixed $_globalValue)
  • scalar $_globalKey: the index where to store the data in the global array dedicated the the class
  • mixed $_globalValue: the value to store
static setOptionAddComments (line 1963)

Sets the optionAddComments value

static array setOptionAddComments ([array $_optionAddComments = array()])
  • array $_optionAddComments
static setOptionCategory (line 1739)

Sets the optionCategory value

Value must be WsdlToPhpGenerator::OPT_CAT_END_NAME or WsdlToPhpGenerator::OPT_CAT_START_NAME or WsdlToPhpGenerator::OPT_CAT_NONE_NAME

static bool setOptionCategory ([int $_optionCategory = self::OPT_CAT_START_NAME])
  • int $_optionCategory
static setOptionDebug (line 1980)

Sts the debug mode

static bool setOptionDebug ([bool $_optionDebug = false])
  • bool $_optionDebug
static setOptionGatherMethods (line 1798)

Sets the optionGatherMethods value

Value must be WsdlToPhpGenerator::OPT_GATH_METH_START_NAME or WsdlToPhpGenerator::OPT_GATH_METH_END_NAME

static bool setOptionGatherMethods ([int $_optionGatherMethods = self::OPT_GATH_METH_START_NAME])
  • int $_optionGatherMethods
static setOptionGenerateAutoloadFile (line 1841)

Sets the optionGenerateAutoloadFile value

static bool setOptionGenerateAutoloadFile ([bool $_optionGenerateAutoloadFile = false])
  • bool $_optionGenerateAutoloadFile
static setOptionGenerateTutorialFile (line 1946)

Sets the optionGenerateTutorialFile value

static bool setOptionGenerateTutorialFile ([bool $_optionGenerateTutorialFile = false])
  • bool $_optionGenerateTutorialFile
static setOptionGenerateWsdlClassFile (line 1858)

Sets the optionGenerateWsdlClassFile value

static bool setOptionGenerateWsdlClassFile ([bool $_optionGenerateWsdlClassFile = false])
  • bool $_optionGenerateWsdlClassFile
static setOptionGenericConstantsNames (line 1929)

Sets the optionGenericConstantsNames value

static bool setOptionGenericConstantsNames ([bool $_optionGenericConstantsNames = false])
  • bool $_optionGenericConstantsNames
static setOptionInheritsClassIdentifier (line 1912)

Sets the optionInheritsClassIdentifier value

static string setOptionInheritsClassIdentifier ([string $_optionInheritsClassIdentifier = ''])
  • string $_optionInheritsClassIdentifier
static setOptionResponseAsWsdlObject (line 1875)

Sets the optionResponseAsWsdlObject value

static bool setOptionResponseAsWsdlObject ([bool $_optionResponseAsWsdlObject = false])
  • bool $_optionResponseAsWsdlObject
static setOptionSendArrayAsParameter (line 1824)

Sets the optionSendArrayAsParameter value

static bool setOptionSendArrayAsParameter ([bool $_optionSendArrayAsParameter = false])
  • bool $_optionSendArrayAsParameter
static setOptionSendParametersAsArray (line 1893)

Sets the pptionSendParametersAsArray value

static bool setOptionSendParametersAsArray ([bool $_optionSendParametersAsArray = false])
  • bool $_optionSendParametersAsArray
static setOptionSubCategory (line 1769)

Sets the optionSubCategory value

Value must be WsdlToPhpGenerator::OPT_SUB_CAT_END_NAME or WsdlToPhpGenerator::OPT_SUB_CAT_START_NAME or WsdlToPhpGenerator::OPT_SUB_CAT_NONE_NAME

static bool setOptionSubCategory ([int $_optionSubCategory = self::OPT_SUB_CAT_START_NAME])
  • int $_optionSubCategory
static setPackageName (line 1998)

Sets the package name

static string setPackageName (string $_packageName)
  • string $_packageName
static unsetGlobals (line 3439)

Clears the global array dedicated the the class

static bool unsetGlobals ()
static wsdlLocationToDomDocument (line 3214)

Returns the DOMDocument object for a wsdl location

static DOMDocument|null wsdlLocationToDomDocument (string $_wsdlLocation)
  • string $_wsdlLocation: the wsdl location
addRestrictionValue (line 1590)

Adds value to restriction struct

void addRestrictionValue (string $_structName, mixed $_value)
  • string $_structName: the original struct name
  • mixed $_value: the value
addService (line 1653)

Adds a service

void addService (string $_functionName, string $_functionParameter, string $_functionReturn)
  • string $_functionName: the original function name
  • string $_functionParameter: the original parameter name
  • string $_functionReturn: the original return name
addServiceFunctionMeta (line 1717)

Adds the service function a meta information

void addServiceFunctionMeta (string $_functionName, string $_functionInfoName, string $_functionInfoValue)
  • string $_functionName: the service name
  • string $_functionInfoName: the function name
  • string $_functionInfoValue: the function info value
addStruct (line 1456)

Adds type to structs

void addStruct (string $_structName, string $_attributeName, string $_attributeType)
  • string $_structName: the original struct name
  • string $_attributeName: the attribute name
  • string $_attributeType: the attribute type
addStructAttributeMeta (line 1549)

Adds an info to the struct attribute

void addStructAttributeMeta (string $_structName, string $_attributeName, string $_attributeInfoName, mixed $_attributeInfoValue)
  • string $_structName: the original struct name
  • string $_attributeName: the attribute name
  • string $_attributeInfoName: the attribute info name
  • mixed $_attributeInfoValue: the attribute info value
addStructMeta (line 1472)

Adds an info to the struct

void addStructMeta (string $_structName, string $_structInfoName, mixed $_structInfoValue)
  • string $_structName: the original struct name
  • string $_structInfoName: the struct info name
  • mixed $_structInfoValue: the struct info value
addVirtualStruct (line 1619)

Adds a virtual struct

void addVirtualStruct (string $_structName)
  • string $_structName: the original struct name
addWsdl (line 2032)

Adds Wsdl location

void addWsdl (string $_wsdlLocation)
  • string $_wsdlLocation
addWsdlMeta (line 2045)

Adds Wsdl location meta information

string addWsdlMeta (string $_metaName, mixed $_metaValue)
  • string $_metaName: meta name
  • mixed $_metaValue: meta value
generateClasses (line 653)

Generates all classes based on options

bool generateClasses (string $_packageName, string $_rootDirectory, [int $_rootDirectoryRights = 0775], [bool $_createRootDirectory = true])
  • string $_packageName: the string used to prefix all generate classes
  • string $_rootDirectory: path where classes should be generated
  • int $_rootDirectoryRights: system rights to apply on folder
  • bool $_createRootDirectory: create root directory if not exist
generateClassMap (line 1102)

Generates classMap class

array generateClassMap (string $_rootDirectory)
  • string $_rootDirectory: the directory
generateServicesClasses (line 1022)

Generates methods by class

array generateServicesClasses (string $_rootDirectory, int $_rootDirectoryRights)
  • string $_rootDirectory: the directory
  • int $_rootDirectoryRights: the directory permissions
generateStructsClasses (line 873)

Generates structs classes based on structs collected

void generateStructsClasses (string $_rootDirectory, int $_rootDirectoryRights)
  • string $_rootDirectory: the directory
  • int $_rootDirectoryRights: the directory permissions
generateTutorialFile (line 1296)

Generates tutorial file

bool generateTutorialFile (string $_rootDirectory, [array $_functionsClassesFiles = array()])
  • string $_rootDirectory: the direcoty
  • array $_functionsClassesFiles: the generated class files
generateWsdlClassFile (line 1224)

Generates Wsdl Class file

array generateWsdlClassFile (string $_rootDirectory)
  • string $_rootDirectory: the directory
getCategory (line 3275)

Gets main category part

string getCategory (WsdlToPhpModel $_model)
getDirectory (line 3251)

Returns directory where to store class and create it if needed

string getDirectory (string $_rootDirectory, int $_rootDirectoryRights, WsdlToPhpModel $_model)
  • string $_rootDirectory: the directory
  • int $_rootDirectoryRights: the permissions to apply
  • WsdlToPhpModel $_model: the model for which we generate the folder
getGather (line 3293)

Gets gather name class

string getGather (WsdlToPhpModel $_model)
getPart (line 3319)

Gets category part

string getPart (WsdlToPhpModel $_model, string $_optionName)
  • WsdlToPhpModel $_model: the model for which we generate the folder
  • string $_optionName: category type
getService (line 1678)

Gets a service by its name

WsdlToPhpService|null getService (string $_serviceName)
  • string $_serviceName: the service name
getServiceFunction (line 1691)

Returns the function

WsdlToPhpFunction|null getServiceFunction (string $_functionName, mixed $_functionParameter)
  • string $_functionName: the original function name
  • mixed $_functionParameter: the original function paramter
getServiceName (line 3303)

Returns the service name associated to the function/operation name in order to gather them in one service class

string getServiceName (string $_functionName)
  • string $_functionName: original operation/function anme
getServices (line 1628)

Returns the services

array getServices ()
getStructAttribute (line 1535)

Gets the struct by its name

WsdlToPhpStructAttribute|null getStructAttribute (string $_structName, string $_attributeName)
  • string $_structName: the original struct name
  • string $_attributeName: the attribute name
getStructs (line 1424)

Returns the structs

array getStructs ()
getStructValue (line 1576)

Gets the struct value by its name

WsdlToPhpStructValue|null getStructValue (string $_structName, string $_valueName)
  • string $_structName: the original struct name
  • string $_valueName: the value name
getSubCategory (line 3284)

Gets sub category part

string getSubCategory (WsdlToPhpModel $_model)
getWsdl (line 2015)

Gets the WSDL at the index

string|null getWsdl (int $_index)
  • int $_index
getWsdls (line 2006)

Gets the WSDLs

array getWsdls ()
initServices (line 932)

Initialize functions :

  • Get structs defined
  • Parse each struct definition

bool initServices ()
initStructs (line 738)

Initialize structs defined in WSDL :

  • Get structs defined
  • Parse each struct definition
  • Analyze each struct paramaters

bool initStructs ()
loadWsdls (line 2059)

Methods to load WSDL from current WSDL when current WSDL imports other WSDL

void loadWsdls ([string $_wsdlLocation = ''], [DOMNode $_domNode = null], [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
  • string $_wsdlLocation: wsdl location to load
  • DOMNode $_domNode: DOMNode to browse
  • string $_fromWsdlLocation: wsdl location where the current $_domNode or $_wsdlLocation is from
  • string $_nodeNameMatch: the name the node name must match, only when it's necessary to match a certain type of nodes
manageWsdlLocation (line 2135)

Default manage method for a location

void manageWsdlLocation (string $_wsdlLocation, DOMNode $_domNode, string $_fromWsdlLocation, [string $_nodeNameMatch = null])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
  • string $_nodeNameMatch: the name the node name must match, only when it's necessary to match a certain type of nodes
manageWsdlNode (line 2179)

Default manage method for a node

void manageWsdlNode ([string $_wsdlLocation = ''], [DOMNode $_domNode = null], [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
  • string $_nodeNameMatch: the name the node name must match, only when it's necessary to match a certain type of nodes
manageWsdlNodeAttribute (line 2814)

Manages attribute node to extract informations about its type if SoapClient didn't succeed to determine it

void manageWsdlNodeAttribute ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
  • string $_nodeNameMatch: the name the node name must match, only when it's necessary to match a certain type of nodes
manageWsdlNodeDocumentation (line 2491)

Manages element method

void manageWsdlNodeDocumentation ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
manageWsdlNodeElement (line 2467)

Manages element method

void manageWsdlNodeElement ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
manageWsdlNodeEnumeration (line 2442)

Manages an enumeratio tag

void manageWsdlNodeEnumeration ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
manageWsdlNodeExtension (line 2578)

Manages extension method

void manageWsdlNodeExtension ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
manageWsdlNodeHeader (line 2633)

Manages header node to extract informations about header types

void manageWsdlNodeHeader ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
  • string $_nodeNameMatch: the name the node name must match, only when it's necessary to match a certain type of nodes
manageWsdlNodeImport (line 2272)

Manages shema import method

void manageWsdlNodeImport ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
manageWsdlNodeInput (line 2981)

Manages input node

void manageWsdlNodeInput ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
  • string $_nodeNameMatch: the name the node name must match, only when it's necessary to match a certain type of nodes
manageWsdlNodeInputOutput (line 3017)

Manages input/output node

void manageWsdlNodeInputOutput ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
  • string $_nodeNameMatch: the name the node name must match, only when it's necessary to match a certain type of nodes
manageWsdlNodeList (line 2949)

Manages list node

void manageWsdlNodeList ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
  • string $_nodeNameMatch: the name the node name must match, only when it's necessary to match a certain type of nodes
manageWsdlNodeOutput (line 2994)

Manages output node

void manageWsdlNodeOutput ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
  • string $_nodeNameMatch: the name the node name must match, only when it's necessary to match a certain type of nodes
manageWsdlNodeRestriction (line 2368)

Manages restriction method

void manageWsdlNodeRestriction ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
manageWsdlNodeUndefined (line 2255)

Undefined node manage method

boolean manageWsdlNodeUndefined ([string $_wsdlLocation = ''], [DOMNode $_domNode = null], [string $_fromWsdlLocation = ''])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
manageWsdlNodeUnion (line 2877)

Manages union node

void manageWsdlNodeUnion ([string $_wsdlLocation = ''], DOMNode $_domNode, [string $_fromWsdlLocation = ''], [string $_nodeNameMatch = null])
  • string $_wsdlLocation: the wsdl location
  • DOMNode $_domNode: the node
  • string $_fromWsdlLocation: the wsdl location imported
  • string $_nodeNameMatch: the name the node name must match, only when it's necessary to match a certain type of nodes
Constructor __construct (line 567)

Constructor

WsdlToPhpGenerator __construct (string $_pathToWsdl, [string $_login = false], [string $_password = false], [array $_options = array()], [array $_wsdlOptions = array()])
  • string $_pathToWsdl: WSDL url or path
  • string $_login: login to get access to WSDL
  • string $_password: password to get access to WSDL
  • array $_options: associative array between WsdlToPhpGenerator options keys and values
  • array $_wsdlOptions: options to get access to WSDL
setServiceFunctionDocumentation (line 1703)

Sets the service function documentation

void setServiceFunctionDocumentation (string $_functionName, string $_documentation)
  • string $_functionName: the service name
  • string $_documentation: the documentation
setServices (line 1637)

Sets the services

array setServices ([array $_services = array()])
  • array $_services
setStructAttributeDocumentation (line 1563)

Adds struct documentation info

void setStructAttributeDocumentation (string $_structName, string $_attributeName, string $_documentation)
  • string $_structName: the original struct name
  • string $_attributeName: the attribute name
  • string $_documentation: the attribute documentation
setStructDocumentation (line 1498)

Adds struct documentation info

void setStructDocumentation (string $_structName, string $_documentation)
  • string $_structName: the original struct name
  • string $_documentation: the struct documentation
setStructInheritance (line 1485)

Sets struct inheritance value

void setStructInheritance (string $_structName, string $_inherits)
  • string $_structName: the original struct name
  • string $_inherits: the struct inheritance name
setStructIsRestriction (line 1510)

Sets the struct as a restriction, which means it contains the enumeration values

void setStructIsRestriction (string $_structName)
  • string $_structName: the original struct name
setStructIsStruct (line 1522)

Sets the struct as a srtuct, which means it has to be generated as a class

void setStructIsStruct (string $_structName)
  • string $_structName: the original struct name
setStructs (line 1433)

Sets the structs

array setStructs ([array $_structs = array()])
  • array $_structs
setStructValueDocumentation (line 1608)

Adds struct value documentation info

void setStructValueDocumentation (string $_structName, string $_valueName, string $_documentation)
  • string $_structName: the original struct name
  • string $_valueName: the value name
  • string $_documentation: the value documentation
setWsdls (line 2024)

Sets the WSDLs

array setWsdls ([array $_wsdls = array()])
  • array $_wsdls
wsdlsLoaded (line 2081)

Method called when wsdls are loaded and all the structs/operations are loaded

Then we can manage some features which can be dependent of all the wsdls linked to the main WSDL

void wsdlsLoaded ()
__toString (line 3596)

Returns current class name

  • return: __CLASS__
  • access: public
string __toString ()

Inherited Methods

Inherited From SoapClient (Internal Class)

 constructor SoapClient ( $wsdl, [$options = ] )
 __call ( $function_name, $arguments )
 __doRequest ( $request, $location, $action, $version, [$one_way = ] )
 __getFunctions ( )
 __getLastRequest ( )
 __getLastRequestHeaders ( )
 __getLastResponse ( )
 __getLastResponseHeaders ( )
 __getTypes ( )
 __setCookie ( $name, [$value = ] )
 __setLocation ( [$new_location = ] )
 __setSoapHeaders ( $soapheaders )
 __soapCall ( $function_name, $arguments, [$options = ], [$input_headers = ], [&$output_headers = ] )
Class Constants
OPT_ADD_COMMENTS = 'option_add_comments_key' (line 427)

Index to set additional PHP doc block tags to every generated file and class

In order to set additional PHP doc block tags, pass an associative array as for example:

  • date=>date('Y-m-d')
  • author=>'Mikaël DELSOL'
  • etc.
so every generated file and class will contain these PHP doc block tags:

OPT_CAT_END_NAME = 0 (line 311)

Sets categorization of classes based on the end of the name of the struct or the function

The category set the tree folders

OPT_CAT_KEY = 'option_category_key' (line 335)

Index to set categorization when calling the constructor

OPT_CAT_NONE_NAME = 2 (line 323)

Sets uncategorization of classes

All files are put in the same folder

OPT_CAT_START_NAME = 1 (line 317)

Sets categorization of classes based on the start of the name of the struct or the function

The category set the tree folders

OPT_CAT_TYPE = 3 (line 330)

Sets typed categorization of classes Files are put in folder named as their ContextualPart value.

In this cas, there is no subfolder.

OPT_DEBUG = 'option_debug' (line 433)

Index to enable/disable debug mode.

Debug only display each call to the audit method to follow the calls and treatments

OPT_GATH_METH_END_NAME = 0 (line 363)

Sets gathering mode of mtehod per class based on the end of the name of the operation

OPT_GATH_METH_KEY = 'option_gather_methods_key' (line 373)

Index to set gathering methods when calling the constructor

OPT_GATH_METH_START_NAME = 1 (line 368)

Sets gathering mode of mtehod per class based on the start of the name of the operation

OPT_GENERIC_CONSTANTS_NAMES_KEY = 'option_generic_constants_names_key' (line 408)

Index to set the generation of contants names based on the enumeration name with an incremental value

OPT_GEN_AUTOLOAD_KEY = 'option_generate_autaload_file_key' (line 383)

Index to enable/disable autoload file generation

OPT_GEN_TUTORIAL_KEY = 'option_generate_tutorial_file_key' (line 413)

Index to enable/disable tutorial file generation

OPT_GEN_WSDL_CLASS_KEY = 'option_generate_wsdl_class_key' (line 388)

Index to enable/disable autoload file generation

OPT_INHERITS_FROM_IDENTIFIER_KEY = 'option_inherits_from_identifier_key' (line 403)

Index to set string that points bases classes from which some classes inherits

OPT_RESPONSE_AS_WSDL_OBJECT_KEY = 'option_response_as_wsdl_object_key' (line 393)

Index to enable/disable encapsulation of response or not in the response object

OPT_SEND_PARAMETERS_AS_ARRAY_KEY = 'option_send_parameters_as_array_key' (line 398)

Index to enable/disable encapsulation of request in array with 'parameters' as main index

OPT_SEND_PARAM_AS_ARRAY_KEY = 'option_send_param_as_array_key' (line 378)

Index to set gathering methods when calling the constructor

OPT_SUB_CAT_END_NAME = 0 (line 341)

Sets subcategorization of classes based on the end of the name of the struct or the function

The category set the tree folders

OPT_SUB_CAT_KEY = 'option_sub_category_key' (line 358)

Index to set subcategorization when calling the constructor

OPT_SUB_CAT_NONE_NAME = 2 (line 353)

Sets uncategorization of classes

All files are put in the same folder

OPT_SUB_CAT_START_NAME = 1 (line 347)

Sets subcategorization of classes based on the start of the name of the struct or the function

The category set the tree folders

WSDL_TO_PHP_GENERATOR_AUDIT_KEY = '__WsdlToPhpGeneratorAuditKey__' (line 305)

Index where audit values are stored in the global var

WSDL_TO_PHP_GENERATOR_GLOBAL_KEY = '__WsdlToPhpGeneratorGlobalKey__' (line 300)

Index where global values are stored in order to unset them once when it's necessary and to clean GLOBALS

Documentation generated on Thu, 20 Feb 2014 22:48:28 +0100 by phpDocumentor 1.4.4