Class WsdlToPhpModel

Description

Class WsdlToPhpModel defines the basic properties and methods to operations and structs extracted from the WSDL

Located in /WsdlToPhpModel.php (line 12)


	
			
Direct descendents
Class Description
 class WsdlToPhpStructValue Class WsdlToPhpStructValue stands for an enumeration value
 class WsdlToPhpService Class WsdlToPhpService stands for an available service containing the functions/operations described in the WSDL
 class WsdlToPhpStructAttribute Class WsdlToPhpStructAttribute stands for an available struct attribute described in the WSDL
 class WsdlToPhpStruct Class WsdlToPhpStruct stands for an available struct described in the WSDL
 class WsdlToPhpFunction Class WsdlToPhpFunction stands for an available operation described in the WSDL
Class Constant Summary
 META_DOCUMENTATION = 'documentation'
 META_FROM_SCHEMA = 'from schema'
Variable Summary
 static array $models
 static string $phpReserverKeywords
 static array $uniqueNames
 string $inheritance
 array $meta
 string $name
Method Summary
 static string cleanComment (string $_comment, [string $_glueSeparator = ','], [bool $_uniqueValues = true])
 static string cleanString (string $_string, [bool $_keepMultipleUnderscores = true])
 static string getGenericWsdlClassName ()
 static WsdlToPhpStruct|null getModelByName (string $_modelName)
 static array getModels ()
 static mixed getValueWithinItsType (mixed $_value, [ $_knownType = null])
 static string replaceReservedPhpKeyword (string $_keyword, string $_context)
 static string uniqueName (string $_name, string $_context)
 mixed addMeta (string $_metaName, mixed $_metaValue)
 void addMetaComment ([array &$_comments = array()], [bool $_addStars = false], [bool $_ignoreDocumentation = false], array $_comments)
 void getClassBody (array &$_class)
 array getClassComment ()
 string getCleanName ([bool $_keepMultipleUnderscores = true])
 array getComment ()
 string getContextualPart ()
 string getDocumentation ()
 array getFileComment ()
 string getFromSchema ()
 string getInheritance ()
 array getMeta ()
 mixed getMetaValue (string $_metaName, [string $_fallback = null])
 mixed getMetaValueFirstSet (array $_names, [string $_fallback = null])
 string getName ()
 string getPackagedName ()
 WsdlToPhpModel __construct (string $_name)
 bool nameIsClean ()
 string setDocumentation (string $_documentation)
 string setFromSchema (string $_fromSchema)
 void setInheritance ([string $_inheritance = ''])
 array setMeta ([array $_meta = array()])
 string setName (string $_name)
 string __toString ()
Variables
static array $models = array() (line 48)

Store all the models generated

  • access: private
static string $phpReserverKeywords = '__construct|__destruct|__call|__callStatic|__get|__set|__isset|__unset|__sleep|__wakeup|__toString|__invoke|__set_state|__clone|getSoapClient|setSoapClient|initSoapClient|setLocation|getDefaultWsdlOptions|getLastRequest|getLastResponse|getFormatedXml|add|getResult|length|count|current|item|offsetGet|offsetSet|key|last|first|next|offsetExists|offsetUnset|rewind|setResult|toSend|valueIsValid|valid|getLastError|setLastError|saveLastError|getLastErrorForMethod|getInternArrayToIterate|setInternArrayToIterate|getInternArrayToIterateOffset|initInternArrayToIterate|setInternArrayToIterateOffset|getInternArrayToIterateIsArray|setInternArrayToIterateIsArray|getAttributeName|__toString|_set|_get|__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor' (line 54)

Reserved PHP keywords

Plus {PackageName}WsdlClass specific/common methods

  • access: private
static array $replacedReservedPhpKeywords = array() (line 59)

Replaced keywords time in order to generate unique new keyword

  • access: private
static array $uniqueNames = array() (line 64)

Unique name generated in order to ensure unique naming (for struct constructor and setters/getters even for different case attribute name whith same value)

  • access: private
string $inheritance = '' (line 38)

Define the inheritance of a struct by the name of the parent struct or type

  • access: private
array $meta = array() (line 33)

Values associated to the operation

  • access: private
string $name = '' (line 28)

Original name od the element

  • access: private
WsdlToPhpModel $owner = null (line 43)

Store the object which owns the current model

  • access: private
Methods
static cleanComment (line 614)

Clean comment

static string cleanComment (string $_comment, [string $_glueSeparator = ','], [bool $_uniqueValues = true])
  • string $_comment: the comment to clean
  • string $_glueSeparator: ths string to use when gathering values
  • bool $_uniqueValues: indicates if comment values must be unique or not
static cleanString (line 486)

Clean a string to make it valid as PHP variable

static string cleanString (string $_string, [bool $_keepMultipleUnderscores = true])
  • string $_string: the string to clean
  • bool $_keepMultipleUnderscores: optional, allows to keep the multiple consecutive underscores
static getGenericWsdlClassName (line 625)

Returns the generic name of the WsdlClass

static string getGenericWsdlClassName ()
static getModels (line 497)

Get models

static array getModels ()
static getValueWithinItsType (line 581)

Returns the value with good type

static mixed getValueWithinItsType (mixed $_value, [ $_knownType = null])
  • mixed $_value: the value
  • $_knownType
static replaceReservedPhpKeyword (line 532)

Returns a usable keyword for a original keyword

static string replaceReservedPhpKeyword (string $_keyword, string $_context)
  • string $_keyword: the keyword
  • string $_context: the context
static uniqueName (line 562)

Static method wich returns a unique name case sensitively

Useful to name methods case sensitively distinct, see http://the-echoplex.net/log/php-case-sensitivity

static string uniqueName (string $_name, string $_context)
  • string $_name: the original name
  • string $_context: the context where the name is needed unique
static updateModels (line 520)

Updates models with model

static WsdlToPhpStruct|bool updateModels (WsdlToPhpModel $_model)
addMeta (line 303)

Add meta information to the operation

mixed addMeta (string $_metaName, mixed $_metaValue)
  • string $_metaName
  • mixed $_metaValue
addMetaComment (line 256)

Add meta informations to comment array

void addMetaComment ([array &$_comments = array()], [bool $_addStars = false], [bool $_ignoreDocumentation = false], array $_comments)
  • array $_comments: array which meta are added to
  • bool $_addStars: add comments tags
  • bool $_ignoreDocumentation: ignore documentation info or not
  • array &$_comments
getClassBody (line 225)

Methods which fills the class body

Must be overridden in classes

void getClassBody (array &$_class)
  • array &$_class

Redefined in descendants as:
getCleanName (line 417)

Returns a valid clean name for PHP

string getCleanName ([bool $_keepMultipleUnderscores = true])
  • bool $_keepMultipleUnderscores: optional, allows to keep the multiple consecutive underscores

Redefined in descendants as:
getComment (line 81)

Returns comments for the element

array getComment ()

Redefined in descendants as:
getContextualPart (line 467)

Allows to define the contextual part of the class name for the package

string getContextualPart ()

Redefined in descendants as:
getDocSubPackages (line 476)

Returns the sub package name which the model belongs to

Must be overridden by sub classes

array getDocSubPackages ()

Redefined in descendants as:
getDocumentation (line 342)

Get the documentation meta value

string getDocumentation ()
getFileComment (line 93)

Returns the comments for the file

array getFileComment ()
getFromSchema (line 363)

Get the from schema meta value

string getFromSchema ()
getMeta (line 282)

Returns the meta

array getMeta ()
getMetaValue (line 374)

Returns a meta value according to its name

mixed getMetaValue (string $_metaName, [string $_fallback = null])
  • string $_metaName: the meta information name
  • string $_fallback: the fallback value if unset
getMetaValueFirstSet (line 384)

Returns the value of the first meta value assigned to the name

mixed getMetaValueFirstSet (array $_names, [string $_fallback = null])
  • array $_names: the meta names to check
  • string $_fallback: the fallback value if anyone is set
getOwner (line 425)

Returns the owner model object

WsdlToPhpModel getOwner ()

Redefined in descendants as:
Constructor __construct (line 72)

Main constructor

WsdlToPhpModel __construct (string $_name)
  • string $_name: the original name

Redefined in descendants as:
nameIsClean (line 447)

Returns true if the original name is safe to use as a PHP property, variable name or class name

bool nameIsClean ()
setDocumentation (line 330)

Sets the documentation meta value.

Documentation is set as an array so if multiple documentation nodes are set for an unique element, it will gather them.

string setDocumentation (string $_documentation)
  • string $_documentation: the documentation from the WSDL
setFromSchema (line 353)

Sets the from schema meta value.

string setFromSchema (string $_fromSchema)
  • string $_fromSchema: the url from which the element comes from
setInheritance (line 240)

Sets the name of the class the current class inherits from

void setInheritance ([string $_inheritance = ''])
  • string $_inheritance
setMeta (line 291)

Sets the meta

  • access: public
array setMeta ([array $_meta = array()])
  • array $_meta
setName (line 406)

Sets the original name extracted from the WSDL

string setName (string $_name)
  • string $_name
setOwner (line 435)

Sets the owner model object

WsdlToPhpModel setOwner (WsdlToPhpModel $_owner)
__toString (line 633)

Returns class name

string __toString ()

Redefined in descendants as:
Class Constants
META_DOCUMENTATION = 'documentation' (line 18)

Constant used to define the key to store documentation value in meta

META_FROM_SCHEMA = 'from schema' (line 23)

Constant used to define the key to store from schema value in meta

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