PHP Class WsdlToPhp\PackageGenerator\Model\AbstractModel

Inheritance: extends WsdlToPhp\PackageGenerator\Generator\AbstractGeneratorAware
Afficher le fichier Open project: wsdltophp/packagegenerator Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Generator $generator, string $name ) Main constructor
addMeta ( string $metaName, mixed $metaValue ) : AbstractModel Add meta information to the operation
cleanString ( string $string, boolean $keepMultipleUnderscores = true ) : string Clean a string to make it valid as PHP variable
getCleanName ( boolean $keepMultipleUnderscores = true ) : string Returns a valid clean name for PHP
getContextualPart ( ) : string Allows to define the contextual part of the class name for the package
getDocSubPackages ( ) : array Returns the sub package name which the model belongs to Must be overridden by sub classes
getExtends ( boolean $short = false ) : string | null Allows to define from which class the curent model extends
getExtendsClassName ( ) : string
getInheritance ( ) : string Returns the name of the class the current class inherits from
getInheritedMoel ( ) : Struct
getIsAbstract ( ) : boolean
getMeta ( ) : string[] Returns the meta
getMetaValue ( string $metaName, mixed $fallback = null ) : mixed Returns a meta value according to its name
getMetaValueFirstSet ( array $names, mixed $fallback = null ) : mixed Returns the value of the first meta value assigned to the name
getName ( ) : string Returns the original name extracted from the WSDL
getNamespace ( ) : string
getOwner ( ) : AbstractModel Returns the owner model object
getPackagedName ( $namespaced = false ) : string Returns the packaged name
getReservedMethodsInstance ( $filename = null ) : AbstractReservedWord
getSubDirectory ( ) : string Returns directory where to store class and create it if needed
nameIsClean ( ) : boolean Returns true if the original name is safe to use as a PHP property, variable name or class name
purgePhpReservedKeywords ( ) Gives the availability for test purpose and multiple package generation to purge reserved keywords usage
purgeReservedMethods ( ) Gives the availability for test purpose and multiple package generation to purge reserved methods usage
purgeUniqueNames ( ) Gives the availability for test purpose and multiple package generation to purge unique names
replacePhpReservedKeyword ( string $keyword, string $context = null ) : string Returns a usable keyword for a original keyword
replaceReservedMethod ( $methodName, string $context = null ) : string Returns a usable method for a original method
setDocumentation ( string $documentation ) : AbstractModel Sets the documentation meta value.
setInheritance ( $inheritance = '' ) Sets the name of the class the current class inherits from
setIsAbstract ( boolean $isAbstract ) : AbstractModel
setMeta ( array $meta = [] ) : AbstractModel Sets the meta
setName ( string $name ) : AbstractModel Sets the original name extracted from the WSDL
setOwner ( AbstractModel $owner ) : AbstractModel Sets the owner model object

Méthodes protégées

Méthode Description
uniqueName ( string $name, string $context ) : string 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

Method Details

__construct() public méthode

Main constructor
public __construct ( Generator $generator, string $name )
$generator WsdlToPhp\PackageGenerator\Generator\Generator
$name string the original name

addMeta() public méthode

Add meta information to the operation
public addMeta ( string $metaName, mixed $metaValue ) : AbstractModel
$metaName string
$metaValue mixed
Résultat AbstractModel

cleanString() public static méthode

Clean a string to make it valid as PHP variable
public static cleanString ( string $string, boolean $keepMultipleUnderscores = true ) : string
$string string the string to clean
$keepMultipleUnderscores boolean optional, allows to keep the multiple consecutive underscores
Résultat string

getCleanName() public méthode

Returns a valid clean name for PHP
public getCleanName ( boolean $keepMultipleUnderscores = true ) : string
$keepMultipleUnderscores boolean optional, allows to keep the multiple consecutive underscores
Résultat string

getContextualPart() public méthode

Allows to define the contextual part of the class name for the package
public getContextualPart ( ) : string
Résultat string

getDocSubPackages() public méthode

Returns the sub package name which the model belongs to Must be overridden by sub classes
public getDocSubPackages ( ) : array
Résultat array

getExtends() public méthode

Allows to define from which class the curent model extends
public getExtends ( boolean $short = false ) : string | null
$short boolean
Résultat string | null

getExtendsClassName() public méthode

public getExtendsClassName ( ) : string
Résultat string

getInheritance() public méthode

Returns the name of the class the current class inherits from
public getInheritance ( ) : string
Résultat string

getInheritedMoel() public méthode

public getInheritedMoel ( ) : Struct
Résultat Struct

getIsAbstract() public méthode

public getIsAbstract ( ) : boolean
Résultat boolean

getMeta() public méthode

Returns the meta
public getMeta ( ) : string[]
Résultat string[]

getMetaValue() public méthode

Returns a meta value according to its name
public getMetaValue ( string $metaName, mixed $fallback = null ) : mixed
$metaName string the meta information name
$fallback mixed the fallback value if unset
Résultat mixed the meta information value

getMetaValueFirstSet() public méthode

Returns the value of the first meta value assigned to the name
public getMetaValueFirstSet ( array $names, mixed $fallback = null ) : mixed
$names array the meta names to check
$fallback mixed the fallback value if anyone is set
Résultat mixed the meta information value

getName() public méthode

Returns the original name extracted from the WSDL
public getName ( ) : string
Résultat string

getNamespace() public méthode

public getNamespace ( ) : string
Résultat string

getOwner() public méthode

Returns the owner model object
public getOwner ( ) : AbstractModel
Résultat AbstractModel

getPackagedName() public méthode

Returns the packaged name
public getPackagedName ( $namespaced = false ) : string
Résultat string

getReservedMethodsInstance() public méthode

public getReservedMethodsInstance ( $filename = null ) : AbstractReservedWord
$filename
Résultat WsdlToPhp\PackageGenerator\ConfigurationReader\AbstractReservedWord

getSubDirectory() public méthode

Returns directory where to store class and create it if needed
public getSubDirectory ( ) : string
Résultat string

nameIsClean() public méthode

Returns true if the original name is safe to use as a PHP property, variable name or class name
public nameIsClean ( ) : boolean
Résultat boolean

purgePhpReservedKeywords() public static méthode

Gives the availability for test purpose and multiple package generation to purge reserved keywords usage
public static purgePhpReservedKeywords ( )

purgeReservedMethods() public static méthode

Gives the availability for test purpose and multiple package generation to purge reserved methods usage
public static purgeReservedMethods ( )

purgeUniqueNames() public static méthode

Gives the availability for test purpose and multiple package generation to purge unique names
public static purgeUniqueNames ( )

replacePhpReservedKeyword() public static méthode

Returns a usable keyword for a original keyword
public static replacePhpReservedKeyword ( string $keyword, string $context = null ) : string
$keyword string the keyword
$context string the context
Résultat string

replaceReservedMethod() public méthode

Returns a usable method for a original method
public replaceReservedMethod ( $methodName, string $context = null ) : string
$context string the context
Résultat string

setDocumentation() public méthode

Documentation is set as an array so if multiple documentation nodes are set for an unique element, it will gather them.
public setDocumentation ( string $documentation ) : AbstractModel
$documentation string the documentation from the WSDL
Résultat AbstractModel

setInheritance() public méthode

Sets the name of the class the current class inherits from
public setInheritance ( $inheritance = '' )

setIsAbstract() public méthode

public setIsAbstract ( boolean $isAbstract ) : AbstractModel
$isAbstract boolean
Résultat AbstractModel

setMeta() public méthode

Sets the meta
public setMeta ( array $meta = [] ) : AbstractModel
$meta array
Résultat AbstractModel

setName() public méthode

Sets the original name extracted from the WSDL
public setName ( string $name ) : AbstractModel
$name string
Résultat AbstractModel

setOwner() public méthode

Sets the owner model object
public setOwner ( AbstractModel $owner ) : AbstractModel
$owner AbstractModel object the owner of the current model
Résultat AbstractModel

uniqueName() protected static méthode

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
protected static uniqueName ( string $name, string $context ) : string
$name string the original name
$context string the context where the name is needed unique
Résultat string