PHP Class WsdlToPhp\PackageGenerator\Model\Struct

Inheritance: extends AbstractModel
Afficher le fichier Open project: wsdltophp/packagegenerator Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Generator $generator, string $name, boolean $isStruct = true, boolean $isRestriction = false ) Main constructor
addAttribute ( string $attributeName, string $attributeType ) : Struct Adds attribute based on its original name
addValue ( mixed $value ) : Struct Adds value to values array
countOwnAttributes ( ) : integer Returns the number of own attributes
getAttribute ( string $attributeName ) : StructAttribute | null Returns the attribute by its name, otherwise null
getAttributes ( boolean $includeInheritanceAttributes = false, boolean $requiredFirst = false ) : StructAttribute Returns the attributes of the struct and potentially from the parent class
getContextualPart ( ) : string Returns 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 Allows to define from which class the curent model extends
getInheritanceStruct ( ) : Struct | null
getIsRestriction ( ) : boolean Returns the isRestriction value
getIsStruct ( ) : boolean Returns the isStruct value
getMeta ( ) : string[]
getReservedMethodsInstance ( $filename = null ) : StructReservedMethod | StructArrayReservedMethod
getTopInheritance ( ) : Struct | null
getValue ( string $value ) : StructValue | null Gets the value object for the given value
getValues ( ) : StructValue Returns the values for an enumeration
isArray ( ) : boolean Returns true if the current struct is a collection of values (like an array)
setAttributes ( StructAttribute $structAttributeContainer ) : Struct Sets the attributes of the struct
setIsRestriction ( boolean $isRestriction = true ) : Struct Sets the isRestriction value
setIsStruct ( boolean $isStruct = true ) : Struct Sets the isStruct value

Méthodes protégées

Méthode Description
addInheritanceAttributes ( StructAttribute $attributes )
getAllAttributes ( boolean $includeInheritanceAttributes, boolean $requiredFirst ) : StructAttribute
putRequiredFirst ( StructAttribute $allAttributes ) : StructAttribute

Private Methods

Méthode Description
setValues ( StructValue $structValueContainer ) : Struct Sets the values for an enumeration

Method Details

__construct() public méthode

Main constructor
See also: AbstractModel::__construct()
public __construct ( Generator $generator, string $name, boolean $isStruct = true, boolean $isRestriction = false )
$generator WsdlToPhp\PackageGenerator\Generator\Generator
$name string the original name
$isStruct boolean defines if it's a real sruct or not
$isRestriction boolean defines if it's an enumeration or not

addAttribute() public méthode

Adds attribute based on its original name
public addAttribute ( string $attributeName, string $attributeType ) : Struct
$attributeName string the attribute name
$attributeType string the attribute type
Résultat Struct

addInheritanceAttributes() protected méthode

protected addInheritanceAttributes ( StructAttribute $attributes )
$attributes WsdlToPhp\PackageGenerator\Container\Model\StructAttribute

addValue() public méthode

Adds value to values array
public addValue ( mixed $value ) : Struct
$value mixed the original value
Résultat Struct

countOwnAttributes() public méthode

Returns the number of own attributes
public countOwnAttributes ( ) : integer
Résultat integer

getAllAttributes() protected méthode

protected getAllAttributes ( boolean $includeInheritanceAttributes, boolean $requiredFirst ) : StructAttribute
$includeInheritanceAttributes boolean
$requiredFirst boolean
Résultat WsdlToPhp\PackageGenerator\Container\Model\StructAttribute

getAttribute() public méthode

Returns the attribute by its name, otherwise null
public getAttribute ( string $attributeName ) : StructAttribute | null
$attributeName string the original attribute name
Résultat StructAttribute | null

getAttributes() public méthode

Returns the attributes of the struct and potentially from the parent class
public getAttributes ( boolean $includeInheritanceAttributes = false, boolean $requiredFirst = false ) : StructAttribute
$includeInheritanceAttributes boolean include the attributes of parent class, default parent attributes are not included. If true, then the array is an associative array containing and index "attribute" for the StructAttribute object and an index "model" for the Struct object.
$requiredFirst boolean places the required attributes first, then the not required in order to have the _contrust method with the required attribute at first
Résultat WsdlToPhp\PackageGenerator\Container\Model\StructAttribute

getContextualPart() public méthode

Returns the contextual part of the class name for the package
See also: AbstractModel::getContextualPart()
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
See also: AbstractModel::getDocSubPackages()
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
$short boolean
Résultat string

getInheritanceStruct() public méthode

public getInheritanceStruct ( ) : Struct | null
Résultat Struct | null

getIsRestriction() public méthode

Returns the isRestriction value
public getIsRestriction ( ) : boolean
Résultat boolean

getIsStruct() public méthode

Returns the isStruct value
public getIsStruct ( ) : boolean
Résultat boolean

getMeta() public méthode

See also: WsdlToPhp\PackageGenerator\Model\AbstractModel::getMeta()
public getMeta ( ) : string[]
Résultat string[]

getReservedMethodsInstance() public méthode

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

getTopInheritance() public méthode

public getTopInheritance ( ) : Struct | null
Résultat Struct | null

getValue() public méthode

Gets the value object for the given value
public getValue ( string $value ) : StructValue | null
$value string Value name
Résultat StructValue | null

getValues() public méthode

Returns the values for an enumeration
public getValues ( ) : StructValue
Résultat WsdlToPhp\PackageGenerator\Container\Model\StructValue

isArray() public méthode

Returns true if the current struct is a collection of values (like an array)
public isArray ( ) : boolean
Résultat boolean

putRequiredFirst() protected méthode

protected putRequiredFirst ( StructAttribute $allAttributes ) : StructAttribute
$allAttributes WsdlToPhp\PackageGenerator\Container\Model\StructAttribute
Résultat WsdlToPhp\PackageGenerator\Container\Model\StructAttribute

setAttributes() public méthode

Sets the attributes of the struct
public setAttributes ( StructAttribute $structAttributeContainer ) : Struct
$structAttributeContainer WsdlToPhp\PackageGenerator\Container\Model\StructAttribute
Résultat Struct

setIsRestriction() public méthode

Sets the isRestriction value
public setIsRestriction ( boolean $isRestriction = true ) : Struct
$isRestriction boolean
Résultat Struct

setIsStruct() public méthode

Sets the isStruct value
public setIsStruct ( boolean $isStruct = true ) : Struct
$isStruct boolean
Résultat Struct