PHP Класс WsdlToPhp\PackageGenerator\Model\AbstractModel

Наследование: extends WsdlToPhp\PackageGenerator\Generator\AbstractGeneratorAware
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
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

Описание методов

__construct() публичный Метод

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

addMeta() публичный Метод

Add meta information to the operation
public addMeta ( string $metaName, mixed $metaValue ) : AbstractModel
$metaName string
$metaValue mixed
Результат AbstractModel

cleanString() публичный статический Метод

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
Результат string

getCleanName() публичный Метод

Returns a valid clean name for PHP
public getCleanName ( boolean $keepMultipleUnderscores = true ) : string
$keepMultipleUnderscores boolean optional, allows to keep the multiple consecutive underscores
Результат string

getContextualPart() публичный Метод

Allows to define the contextual part of the class name for the package
public getContextualPart ( ) : string
Результат string

getDocSubPackages() публичный Метод

Returns the sub package name which the model belongs to Must be overridden by sub classes
public getDocSubPackages ( ) : array
Результат array

getExtends() публичный Метод

Allows to define from which class the curent model extends
public getExtends ( boolean $short = false ) : string | null
$short boolean
Результат string | null

getExtendsClassName() публичный Метод

public getExtendsClassName ( ) : string
Результат string

getInheritance() публичный Метод

Returns the name of the class the current class inherits from
public getInheritance ( ) : string
Результат string

getInheritedMoel() публичный Метод

public getInheritedMoel ( ) : Struct
Результат Struct

getIsAbstract() публичный Метод

public getIsAbstract ( ) : boolean
Результат boolean

getMeta() публичный Метод

Returns the meta
public getMeta ( ) : string[]
Результат string[]

getMetaValue() публичный Метод

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
Результат mixed the meta information value

getMetaValueFirstSet() публичный Метод

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
Результат mixed the meta information value

getName() публичный Метод

Returns the original name extracted from the WSDL
public getName ( ) : string
Результат string

getNamespace() публичный Метод

public getNamespace ( ) : string
Результат string

getOwner() публичный Метод

Returns the owner model object
public getOwner ( ) : AbstractModel
Результат AbstractModel

getPackagedName() публичный Метод

Returns the packaged name
public getPackagedName ( $namespaced = false ) : string
Результат string

getReservedMethodsInstance() публичный Метод

public getReservedMethodsInstance ( $filename = null ) : AbstractReservedWord
$filename
Результат WsdlToPhp\PackageGenerator\ConfigurationReader\AbstractReservedWord

getSubDirectory() публичный Метод

Returns directory where to store class and create it if needed
public getSubDirectory ( ) : string
Результат string

nameIsClean() публичный Метод

Returns true if the original name is safe to use as a PHP property, variable name or class name
public nameIsClean ( ) : boolean
Результат boolean

purgePhpReservedKeywords() публичный статический Метод

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

purgeReservedMethods() публичный статический Метод

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

purgeUniqueNames() публичный статический Метод

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

replacePhpReservedKeyword() публичный статический Метод

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
Результат string

replaceReservedMethod() публичный Метод

Returns a usable method for a original method
public replaceReservedMethod ( $methodName, string $context = null ) : string
$context string the context
Результат string

setDocumentation() публичный Метод

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
Результат AbstractModel

setInheritance() публичный Метод

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

setIsAbstract() публичный Метод

public setIsAbstract ( boolean $isAbstract ) : AbstractModel
$isAbstract boolean
Результат AbstractModel

setMeta() публичный Метод

Sets the meta
public setMeta ( array $meta = [] ) : AbstractModel
$meta array
Результат AbstractModel

setName() публичный Метод

Sets the original name extracted from the WSDL
public setName ( string $name ) : AbstractModel
$name string
Результат AbstractModel

setOwner() публичный Метод

Sets the owner model object
public setOwner ( AbstractModel $owner ) : AbstractModel
$owner AbstractModel object the owner of the current model
Результат AbstractModel

uniqueName() защищенный статический Метод

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
Результат string