class StructEnum extends Struct (View source)

Constants

PHP_FILE_EXTENSION

ANNOTATION_META_LENGTH

ANNOTATION_LONG_LENGTH

ANNOTATION_PACKAGE

ANNOTATION_SUB_PACKAGE

ANNOTATION_RETURN

ANNOTATION_USES

ANNOTATION_PARAM

ANNOTATION_VAR

ANNOTATION_SEE

ANNOTATION_THROWS

METHOD_CONSTRUCT

METHOD_SET_STATE

TYPE_STRING

TYPE_ARRAY

METHOD_VALUE_IS_VALID

METHOD_GET_VALID_VALUES

Properties

protected Generator $generator from AbstractFile
protected PhpFile $file from AbstractFile
protected Method $methods from AbstractModelFile

Methods

__construct(Generator $generator, string $name)

No description

setGenerator(Generator $generator)

No description

getGenerator()

No description

void
write()

No description

int|bool
writeFile(bool $withSrc = true)

No description

string
getFileName()

No description

string
getFileDestination(bool $withSrc = true)

No description

string
getFileExtension()

No description

setFile(PhpFile $file)

No description

PhpFile
getFile()

No description

string
getDestinationFolder(bool $withSrc = true)

No description

setModel(AbstractModel $model)

No description

getModel()

No description

from Struct
Struct|null
getModelByName(string $name)

No description

definePackageAnnotations(PhpAnnotationBlock $block)

No description

string
getPackageName()

No description

defineGeneralAnnotations(PhpAnnotationBlock $block)

No description

PhpAnnotationBlock
getClassAnnotationBlock()

No description

string
getClassDeclarationLine()

No description

string
getClassDeclarationLineText()

No description

defineModelAnnotationsFromWsdl(PhpAnnotationBlock $block, AbstractModel $model = null)

No description

defineConstants(PhpClass $class)

No description

defineProperties(PhpClass $class)

No description

defineMethods(PhpClass $class)

No description

getClassConstants(Constant $constants)

No description

PhpAnnotationBlock|null
getConstantAnnotationBlock(PhpConstant $constant)

No description

getClassProperties(Property $properties)

No description

from Struct
PhpAnnotationBlock|null
getPropertyAnnotationBlock(PhpProperty $property)

No description

from Struct
void
fillClassMethods()

This method is responsible for filling in the $methods property with appropriate methods for the current model

PhpAnnotationBlock|null
getMethodAnnotationBlock(PhpMethod $method)

No description

defineStringMethod(PhpClass $class)

No description

PhpAnnotationBlock
PhpMethod
getToStringMethod()

No description

getStructAttribute(StructAttribute $attribute = null)

No description

Struct|null
getModelFromStructAttribute(StructAttribute $attribute = null)

No description

Struct|null
getRestrictionFromStructAttribute(StructAttribute $attribute = null)

No description

bool
isAttributeAList(StructAttribute $attribute = null)

No description

string
getStructAttributeType(StructAttribute $attribute = null, bool $namespaced = false)

No description

string
getStructAttributeTypeGetAnnotation(StructAttribute $attribute = null, bool $returnArrayType = true)

No description

string
getStructAttributeTypeSetAnnotation(StructAttribute $attribute = null, bool $returnArrayType = true)

No description

bool
useBrackets(StructAttribute $attribute, bool $returnArrayType = true)

No description

string
getStructAttributeTypeHint(StructAttribute $attribute = null, bool $returnArrayType = true)

No description

string
getStructAttributeTypeAsPhpType(StructAttribute $attribute = null)

No description

static mixed
getValidType($type, $xsdTypesPath = null, $fallback = null)

See http://php.net/manual/fr/language.oop5.typehinting.php for these cases Also see http://www.w3schools.com/schema/schema_dtypes_numeric.asp

static mixed
getPhpType($type, $xsdTypesPath = null, $fallback = self::TYPE_STRING)

See http://php.net/manual/fr/language.oop5.typehinting.php for these cases Also see http://www.w3schools.com/schema/schema_dtypes_numeric.asp

getModelAttributes(bool $includeInheritanceAttributes = false, bool $requiredFirst = true)

No description

from Struct
addStructMethodConstruct()

No description

from Struct
addStructMethodConstructBody(PhpMethod $method)

No description

from Struct
addStructMethodConstructBodyForAttribute(PhpMethod $method, StructAttribute $attribute, bool $isLast)

No description

from Struct
PhpFunctionParameter[]
from Struct
PhpFunctionParameter
getStructMethodParameter(StructAttribute $attribute, bool $lowCaseFirstLetter = false, mixed $defaultValue = null)

No description

from Struct
string|null
getStructMethodParameterType(StructAttribute $attribute, bool $returnArrayType = true)

No description

from Struct
addStructMethodsSetAndGet()

No description

from Struct
addStructMethodAddTo(StructAttribute $attribute)

No description

from Struct
addStructMethodAddToBody(PhpMethod $method, StructAttribute $attribute)

No description

from Struct
addStructMethodSet(StructAttribute $attribute)

No description

from Struct
addStructMethodSetBody(PhpMethod $method, StructAttribute $attribute)

No description

from Struct
addStructMethodSetBodyAssignment(PhpMethod $method, StructAttribute $attribute)

No description

from Struct
addStructMethodSetBodyReturn(PhpMethod $method)

No description

from Struct
string
getStructMethodSetBodyAssignment(StructAttribute $attribute, string $parameterName)

No description

from Struct
addStructMethodGetBody(PhpMethod $method, StructAttribute $attribute, string $thisAccess)

No description

from Struct
addStructMethodGetBodyReturn(PhpMethod $method, StructAttribute $attribute, string $thisAccess)

No description

from Struct
addStructMethodGet(StructAttribute $attribute)

No description

from Struct
PhpFunctionParameter[]
getStructMethodGetParameters(StructAttribute $attribute)

No description

from Struct
addStructMethodSetState()

No description

from Struct
PhpAnnotationBlock|null
getStructMethodAnnotationBlock(PhpMethod $method)

No description

from Struct
PhpAnnotationBlock
from Struct
PhpAnnotationBlock
from Struct
PhpAnnotationBlock
getStructMethodsSetAndGetAnnotationBlock(PhpMethod $method)

No description

from Struct
addStructMethodsSetAndGetAnnotationBlockFromStructAttribute(string $setOrGet, PhpAnnotationBlock $annotationBlock, StructAttribute $attribute)

No description

from Struct
addStructMethodsSetAndGetAnnotationBlockFromScalar(string $setOrGet, PhpAnnotationBlock $annotationBlock, string $attributeName)

No description

from Struct
addStructMethodsSetAnnotationBlock(PhpAnnotationBlock $annotationBlock, string $type, string $name)

No description

from Struct
addStructMethodsGetAnnotationBlock(PhpAnnotationBlock $annotationBlock, string $attributeType)

No description

from Struct
addStructMethodsGetAnnotationBlockFromXmlAttribute(PhpAnnotationBlock $annotationBlock, StructAttribute $attribute)

No description

from Struct
addStructPropertiesToAnnotationBlock(PhpAnnotationBlock $annotationBlock)

No description

from Struct
addStructPropertiesToAnnotationBlockUses(PhpAnnotationBlock $annotationBlock)

No description

from Struct
addStructPropertiesToAnnotationBlockParams(PhpAnnotationBlock $annotationBlock)

No description

from Struct
PhpAnnotationBlock
getStructMethodsAddToAnnotationBlock(PhpMethod $method)

No description

from Struct
PhpAnnotationBlock
getStructMethodsValidateArrayAnnotationBlock(PhpMethod $method)

No description

from Struct
PhpAnnotationBlock
getStructMethodsValidateUnionAnnotationBlock(PhpMethod $method)

No description

from Struct
PhpAnnotationBlock
getStructMethodsValidateChoiceAnnotationBlock(PhpMethod $method)

No description

from Struct
PhpAnnotationBlock
getStructMethodsValidateLengthAnnotationBlock(PhpMethod $method, string $type = '')

No description

from Struct
applyRules(PhpMethod $method, StructAttribute $attribute, $parameterName, bool $itemType = false)

No description

from Struct
PhpMethod
getEnumMethodValueIsValid()

No description

PhpMethod
getEnumMethodGetValidValues()

No description

string[]
getEnumMethodValues()

No description

PhpAnnotationBlock
PhpAnnotationBlock

Details

__construct(Generator $generator, string $name)

Parameters

Generator $generator
string $name

AbstractFile setGenerator(Generator $generator)

Parameters

Generator $generator

Return Value

AbstractFile

Generator getGenerator()

Return Value

Generator

void write()

Return Value

void

int|bool writeFile(bool $withSrc = true)

Parameters

bool $withSrc

Return Value

int|bool

See also

\WsdlToPhp\PackageGenerator\File\AbstractFile::writeFile()

string getFileName()

Return Value

string

string getFileDestination(bool $withSrc = true)

Parameters

bool $withSrc

Return Value

string

string getFileExtension()

Return Value

string

protected AbstractFile setFile(PhpFile $file)

Parameters

PhpFile $file

Return Value

AbstractFile

PhpFile getFile()

Return Value

PhpFile

string getDestinationFolder(bool $withSrc = true)

Parameters

bool $withSrc

Return Value

string

protected AbstractModelFile addAnnotationBlock()

Return Value

AbstractModelFile

AbstractModelFile setModel(AbstractModel $model)

Parameters

AbstractModel $model

Return Value

AbstractModelFile

Exceptions

InvalidArgumentException

See also

\WsdlToPhp\PackageGenerator\File\AbstractModelFile::setModel()

AbstractModel getModel()

Return Value

AbstractModel

See also

\WsdlToPhp\PackageGenerator\File\AbstractModelFile::getModel()

protected Struct|null getModelByName(string $name)

Parameters

string $name

Return Value

Struct|null

protected AbstractModelFile definePackageAnnotations(PhpAnnotationBlock $block)

Parameters

PhpAnnotationBlock $block

Return Value

AbstractModelFile

protected string getPackageName()

Return Value

string

protected AbstractModelFile defineGeneralAnnotations(PhpAnnotationBlock $block)

Parameters

PhpAnnotationBlock $block

Return Value

AbstractModelFile

protected PhpAnnotationBlock getClassAnnotationBlock()

Return Value

PhpAnnotationBlock

protected string getClassDeclarationLine()

Return Value

string

protected string getClassDeclarationLineText()

Return Value

string

protected AbstractModelFile defineModelAnnotationsFromWsdl(PhpAnnotationBlock $block, AbstractModel $model = null)

Parameters

PhpAnnotationBlock $block
AbstractModel $model

Return Value

AbstractModelFile

protected AbstractModelFile addClassElement()

Return Value

AbstractModelFile

protected AbstractModelFile defineNamespace()

Return Value

AbstractModelFile

protected AbstractModelFile defineUseStatement()

Return Value

AbstractModelFile

protected AbstractModelFile defineConstants(PhpClass $class)

Parameters

PhpClass $class

Return Value

AbstractModelFile

protected AbstractModelFile defineProperties(PhpClass $class)

Parameters

PhpClass $class

Return Value

AbstractModelFile

protected AbstractModelFile defineMethods(PhpClass $class)

Parameters

PhpClass $class

Return Value

AbstractModelFile

protected getClassConstants(Constant $constants)

Parameters

Constant $constants

protected PhpAnnotationBlock|null getConstantAnnotationBlock(PhpConstant $constant)

Parameters

PhpConstant $constant

Return Value

PhpAnnotationBlock|null

protected getClassProperties(Property $properties)

Parameters

Property $properties

protected PhpAnnotationBlock|null getPropertyAnnotationBlock(PhpProperty $property)

Parameters

PhpProperty $property

Return Value

PhpAnnotationBlock|null

protected void fillClassMethods()

This method is responsible for filling in the $methods property with appropriate methods for the current model

Return Value

void

protected PhpAnnotationBlock|null getMethodAnnotationBlock(PhpMethod $method)

Parameters

PhpMethod $method

Return Value

PhpAnnotationBlock|null

protected AbstractModelFile defineStringMethod(PhpClass $class)

Parameters

PhpClass $class

Return Value

AbstractModelFile

protected PhpAnnotationBlock getToStringMethodAnnotationBlock()

Return Value

PhpAnnotationBlock

protected PhpMethod getToStringMethod()

Return Value

PhpMethod

protected StructAttribute getStructAttribute(StructAttribute $attribute = null)

Parameters

StructAttribute $attribute

Return Value

StructAttribute

Struct|null getModelFromStructAttribute(StructAttribute $attribute = null)

Parameters

StructAttribute $attribute

Return Value

Struct|null

Struct|null getRestrictionFromStructAttribute(StructAttribute $attribute = null)

Parameters

StructAttribute $attribute

Return Value

Struct|null

bool isAttributeAList(StructAttribute $attribute = null)

Parameters

StructAttribute $attribute

Return Value

bool

string getStructAttributeType(StructAttribute $attribute = null, bool $namespaced = false)

Parameters

StructAttribute $attribute
bool $namespaced

Return Value

string

protected string getStructAttributeTypeGetAnnotation(StructAttribute $attribute = null, bool $returnArrayType = true)

Parameters

StructAttribute $attribute
bool $returnArrayType

Return Value

string

protected string getStructAttributeTypeSetAnnotation(StructAttribute $attribute = null, bool $returnArrayType = true)

Parameters

StructAttribute $attribute
bool $returnArrayType

Return Value

string

protected bool useBrackets(StructAttribute $attribute, bool $returnArrayType = true)

Parameters

StructAttribute $attribute
bool $returnArrayType

Return Value

bool

protected string getStructAttributeTypeHint(StructAttribute $attribute = null, bool $returnArrayType = true)

Parameters

StructAttribute $attribute
bool $returnArrayType

Return Value

string

string getStructAttributeTypeAsPhpType(StructAttribute $attribute = null)

Parameters

StructAttribute $attribute

Return Value

string

static mixed getValidType($type, $xsdTypesPath = null, $fallback = null)

See http://php.net/manual/fr/language.oop5.typehinting.php for these cases Also see http://www.w3schools.com/schema/schema_dtypes_numeric.asp

Parameters

$type
$xsdTypesPath
$fallback

Return Value

mixed

static mixed getPhpType($type, $xsdTypesPath = null, $fallback = self::TYPE_STRING)

See http://php.net/manual/fr/language.oop5.typehinting.php for these cases Also see http://www.w3schools.com/schema/schema_dtypes_numeric.asp

Parameters

$type
$xsdTypesPath
$fallback

Return Value

mixed

protected StructAttribute getModelAttributes(bool $includeInheritanceAttributes = false, bool $requiredFirst = true)

Parameters

bool $includeInheritanceAttributes 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.
bool $requiredFirst places the required attributes first, then the not required in order to have the _contrust method with the required attribute at first

Return Value

StructAttribute

protected Struct addStructMethodConstruct()

Return Value

Struct

protected Struct addStructMethodConstructBody(PhpMethod $method)

Parameters

PhpMethod $method

Return Value

Struct

protected Struct addStructMethodConstructBodyForAttribute(PhpMethod $method, StructAttribute $attribute, bool $isLast)

Parameters

PhpMethod $method
StructAttribute $attribute
bool $isLast

Return Value

Struct

protected PhpFunctionParameter[] getStructMethodParametersValues()

Return Value

PhpFunctionParameter[]

protected PhpFunctionParameter getStructMethodParameter(StructAttribute $attribute, bool $lowCaseFirstLetter = false, mixed $defaultValue = null)

Parameters

StructAttribute $attribute
bool $lowCaseFirstLetter
mixed $defaultValue

Return Value

PhpFunctionParameter

protected string|null getStructMethodParameterType(StructAttribute $attribute, bool $returnArrayType = true)

Parameters

StructAttribute $attribute
bool $returnArrayType

Return Value

string|null

protected Struct addStructMethodsSetAndGet()

Return Value

Struct

protected Struct addStructMethodAddTo(StructAttribute $attribute)

Parameters

StructAttribute $attribute

Return Value

Struct

protected Struct addStructMethodAddToBody(PhpMethod $method, StructAttribute $attribute)

Parameters

PhpMethod $method
StructAttribute $attribute

Return Value

Struct

protected Struct addStructMethodSet(StructAttribute $attribute)

Parameters

StructAttribute $attribute

Return Value

Struct

protected Struct addStructMethodSetBody(PhpMethod $method, StructAttribute $attribute)

Parameters

PhpMethod $method
StructAttribute $attribute

Return Value

Struct

protected Struct addStructMethodSetBodyAssignment(PhpMethod $method, StructAttribute $attribute)

Parameters

PhpMethod $method
StructAttribute $attribute

Return Value

Struct

protected Struct addStructMethodSetBodyReturn(PhpMethod $method)

Parameters

PhpMethod $method

Return Value

Struct

protected string getStructMethodSetBodyAssignment(StructAttribute $attribute, string $parameterName)

Parameters

StructAttribute $attribute
string $parameterName

Return Value

string

protected Struct addStructMethodGetBody(PhpMethod $method, StructAttribute $attribute, string $thisAccess)

Parameters

PhpMethod $method
StructAttribute $attribute
string $thisAccess

Return Value

Struct

protected Struct addStructMethodGetBodyReturn(PhpMethod $method, StructAttribute $attribute, string $thisAccess)

Parameters

PhpMethod $method
StructAttribute $attribute
string $thisAccess

Return Value

Struct

protected Struct addStructMethodGet(StructAttribute $attribute)

Parameters

StructAttribute $attribute

Return Value

Struct

protected PhpFunctionParameter[] getStructMethodGetParameters(StructAttribute $attribute)

Parameters

StructAttribute $attribute

Return Value

PhpFunctionParameter[]

protected Struct addStructMethodSetState()

Return Value

Struct

protected PhpAnnotationBlock|null getStructMethodAnnotationBlock(PhpMethod $method)

Parameters

PhpMethod $method

Return Value

PhpAnnotationBlock|null

protected PhpAnnotationBlock getStructMethodConstructAnnotationBlock()

Return Value

PhpAnnotationBlock

protected PhpAnnotationBlock getStructMethodSetStateAnnotationBlock()

Return Value

PhpAnnotationBlock

protected PhpAnnotationBlock getStructMethodsSetAndGetAnnotationBlock(PhpMethod $method)

Parameters

PhpMethod $method

Return Value

PhpAnnotationBlock

protected Struct addStructMethodsSetAndGetAnnotationBlockFromStructAttribute(string $setOrGet, PhpAnnotationBlock $annotationBlock, StructAttribute $attribute)

Parameters

string $setOrGet
PhpAnnotationBlock $annotationBlock
StructAttribute $attribute

Return Value

Struct

protected Struct addStructMethodsSetAndGetAnnotationBlockFromScalar(string $setOrGet, PhpAnnotationBlock $annotationBlock, string $attributeName)

Parameters

string $setOrGet
PhpAnnotationBlock $annotationBlock
string $attributeName

Return Value

Struct

protected Struct addStructMethodsSetAnnotationBlock(PhpAnnotationBlock $annotationBlock, string $type, string $name)

Parameters

PhpAnnotationBlock $annotationBlock
string $type
string $name

Return Value

Struct

protected Struct addStructMethodsGetAnnotationBlock(PhpAnnotationBlock $annotationBlock, string $attributeType)

Parameters

PhpAnnotationBlock $annotationBlock
string $attributeType

Return Value

Struct

protected Struct addStructMethodsGetAnnotationBlockFromXmlAttribute(PhpAnnotationBlock $annotationBlock, StructAttribute $attribute)

Parameters

PhpAnnotationBlock $annotationBlock
StructAttribute $attribute

Return Value

Struct

protected Struct addStructPropertiesToAnnotationBlock(PhpAnnotationBlock $annotationBlock)

Parameters

PhpAnnotationBlock $annotationBlock

Return Value

Struct

protected Struct addStructPropertiesToAnnotationBlockUses(PhpAnnotationBlock $annotationBlock)

Parameters

PhpAnnotationBlock $annotationBlock

Return Value

Struct

protected Struct addStructPropertiesToAnnotationBlockParams(PhpAnnotationBlock $annotationBlock)

Parameters

PhpAnnotationBlock $annotationBlock

Return Value

Struct

protected PhpAnnotationBlock getStructMethodsAddToAnnotationBlock(PhpMethod $method)

Parameters

PhpMethod $method

Return Value

PhpAnnotationBlock

protected PhpAnnotationBlock getStructMethodsValidateArrayAnnotationBlock(PhpMethod $method)

Parameters

PhpMethod $method

Return Value

PhpAnnotationBlock

protected PhpAnnotationBlock getStructMethodsValidateUnionAnnotationBlock(PhpMethod $method)

Parameters

PhpMethod $method

Return Value

PhpAnnotationBlock

protected PhpAnnotationBlock getStructMethodsValidateChoiceAnnotationBlock(PhpMethod $method)

Parameters

PhpMethod $method

Return Value

PhpAnnotationBlock

protected PhpAnnotationBlock getStructMethodsValidateLengthAnnotationBlock(PhpMethod $method, string $type = '')

Parameters

PhpMethod $method
string $type

Return Value

PhpAnnotationBlock

protected applyRules(PhpMethod $method, StructAttribute $attribute, $parameterName, bool $itemType = false)

Parameters

PhpMethod $method
StructAttribute $attribute
$parameterName
bool $itemType

protected PhpMethod getEnumMethodValueIsValid()

Return Value

PhpMethod

protected PhpMethod getEnumMethodGetValidValues()

Return Value

PhpMethod

protected string[] getEnumMethodValues()

Return Value

string[]

protected PhpAnnotationBlock getEnumValueIsValidAnnotationBlock()

Return Value

PhpAnnotationBlock

protected PhpAnnotationBlock getEnumGetValidValuesAnnotationBlock()

Return Value

PhpAnnotationBlock