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
Method to initialize audit for an element
static bool
auditInit
(string $_auditName, [string $_auditElement = ''])
-
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
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
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
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
Returns the audit informations
static array
getAudit
()
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
Gets the optionAddComments value
static array
getOptionAddComments
()
Sets the optionCategory value
static int
getOptionCategory
()
Gets the debug mode value
static bool
getOptionDebug
()
Sets the optionGatherMethods value
static int
getOptionGatherMethods
()
Gets the optionGenerateAutoloadFile value
static bool
getOptionGenerateAutoloadFile
()
Gets the optionGenerateTutorialFile value
static bool
getOptionGenerateTutorialFile
()
Gets the optionGenerateWsdlClassFile value
static bool
getOptionGenerateWsdlClassFile
()
Gets the optionGenericConstantsNames value
static bool
getOptionGenericConstantsNames
()
Gets the optionInheritsClassIdentifier value
static string
getOptionInheritsClassIdentifier
()
Gets the optionResponseAsWsdlObject value
static bool
getOptionResponseAsWsdlObject
()
Gets the optionSendArrayAsParameter value
static bool
getOptionSendArrayAsParameter
()
Gets the optionResponseAsWsdlObject value
static bool
getOptionSendParametersAsArray
()
Sets the optionSubCategory value
static int
getOptionSubCategory
()
Gets the package name
static string
getPackageName
([bool $_ucFirst = true])
-
bool
$_ucFirst: ucfirst package name or not
Inits global array dedicated to the class
static bool
initGlobals
()
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
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
Sets the optionAddComments value
static array
setOptionAddComments
([array $_optionAddComments = array()])
-
array
$_optionAddComments
Sts the debug mode
static bool
setOptionDebug
([bool $_optionDebug = false])
Sets the optionGenerateAutoloadFile value
static bool
setOptionGenerateAutoloadFile
([bool $_optionGenerateAutoloadFile = false])
-
bool
$_optionGenerateAutoloadFile
Sets the optionGenerateTutorialFile value
static bool
setOptionGenerateTutorialFile
([bool $_optionGenerateTutorialFile = false])
-
bool
$_optionGenerateTutorialFile
Sets the optionGenerateWsdlClassFile value
static bool
setOptionGenerateWsdlClassFile
([bool $_optionGenerateWsdlClassFile = false])
-
bool
$_optionGenerateWsdlClassFile
Sets the optionGenericConstantsNames value
static bool
setOptionGenericConstantsNames
([bool $_optionGenericConstantsNames = false])
-
bool
$_optionGenericConstantsNames
Sets the optionInheritsClassIdentifier value
static string
setOptionInheritsClassIdentifier
([string $_optionInheritsClassIdentifier = ''])
-
string
$_optionInheritsClassIdentifier
Sets the optionResponseAsWsdlObject value
static bool
setOptionResponseAsWsdlObject
([bool $_optionResponseAsWsdlObject = false])
-
bool
$_optionResponseAsWsdlObject
Sets the optionSendArrayAsParameter value
static bool
setOptionSendArrayAsParameter
([bool $_optionSendArrayAsParameter = false])
-
bool
$_optionSendArrayAsParameter
Sets the pptionSendParametersAsArray value
static bool
setOptionSendParametersAsArray
([bool $_optionSendParametersAsArray = false])
-
bool
$_optionSendParametersAsArray
Sets the package name
static string
setPackageName
(string $_packageName)
Clears the global array dedicated the the class
static bool
unsetGlobals
()
Returns the DOMDocument object for a wsdl location
static DOMDocument|null
wsdlLocationToDomDocument
(string $_wsdlLocation)
-
string
$_wsdlLocation: the wsdl location
Adds value to restriction struct
void
addRestrictionValue
(string $_structName, mixed $_value)
-
string
$_structName: the original struct name
-
mixed
$_value: the value
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
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
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
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
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
Adds a virtual struct
void
addVirtualStruct
(string $_structName)
-
string
$_structName: the original struct name
Adds Wsdl location
void
addWsdl
(string $_wsdlLocation)
Adds Wsdl location meta information
string
addWsdlMeta
(string $_metaName, mixed $_metaValue)
-
string
$_metaName: meta name
-
mixed
$_metaValue: meta value
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
Generates classMap class
array
generateClassMap
(string $_rootDirectory)
-
string
$_rootDirectory: the directory
Generates methods by class
array
generateServicesClasses
(string $_rootDirectory, int $_rootDirectoryRights)
-
string
$_rootDirectory: the directory
-
int
$_rootDirectoryRights: the directory permissions
Generates structs classes based on structs collected
void
generateStructsClasses
(string $_rootDirectory, int $_rootDirectoryRights)
-
string
$_rootDirectory: the directory
-
int
$_rootDirectoryRights: the directory permissions
Generates tutorial file
bool
generateTutorialFile
(string $_rootDirectory, [array $_functionsClassesFiles = array()])
-
string
$_rootDirectory: the direcoty
-
array
$_functionsClassesFiles: the generated class files
Generates Wsdl Class file
array
generateWsdlClassFile
(string $_rootDirectory)
-
string
$_rootDirectory: the directory
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
Gets category part
-
WsdlToPhpModel
$_model: the model for which we generate the folder
-
string
$_optionName: category type
Gets a service by its name
-
string
$_serviceName: the service name
Returns the function
WsdlToPhpFunction|null
getServiceFunction
(
string $_functionName,
mixed $_functionParameter)
-
string
$_functionName: the original function name
-
mixed
$_functionParameter: the original function paramter
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
Returns the services
array
getServices
()
Gets the struct by its name
-
string
$_structName: the original struct name
Gets the struct by its name
-
string
$_structName: the original struct name
-
string
$_attributeName: the attribute name
Returns the structs
array
getStructs
()
Gets the struct value by its name
-
string
$_structName: the original struct name
-
string
$_valueName: the value name
Gets the WSDL at the index
string|null
getWsdl
(int $_index)
Gets the WSDLs
array
getWsdls
()
Initialize functions :
- Get structs defined
- Parse each struct definition
bool
initServices
()
Initialize structs defined in WSDL :
- Get structs defined
- Parse each struct definition
- Analyze each struct paramaters
bool
initStructs
()
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Sets the service function documentation
void
setServiceFunctionDocumentation
(string $_functionName, string $_documentation)
-
string
$_functionName: the service name
-
string
$_documentation: the documentation
Sets the services
array
setServices
([array $_services = array()])
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
Adds struct documentation info
void
setStructDocumentation
(string $_structName, string $_documentation)
-
string
$_structName: the original struct name
-
string
$_documentation: the struct documentation
Sets struct inheritance value
void
setStructInheritance
(string $_structName, string $_inherits)
-
string
$_structName: the original struct name
-
string
$_inherits: the struct inheritance name
Sets the struct as a restriction, which means it contains the enumeration values
void
setStructIsRestriction
(string $_structName)
-
string
$_structName: the original struct name
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
Sets the structs
array
setStructs
([array $_structs = array()])
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
Sets the WSDLs
array
setWsdls
([array $_wsdls = array()])
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
()
Returns current class name
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 = ] )