class AbstractModelFile extends AbstractFile (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

Properties

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

Methods

__construct(Generator $generator, string $name)

No description

setGenerator(Generator $generator)

No description

getGenerator()

No description

void
write()

No description

void
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

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

PhpAnnotationBlock|null
getPropertyAnnotationBlock(PhpProperty $property)

No description

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

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

void writeFile(bool $withSrc = true)

Parameters

bool $withSrc

Return Value

void

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

AbstractModel getModel()

Return Value

AbstractModel

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

abstract protected getClassConstants(Constant $constants)

Parameters

Constant $constants

abstract protected PhpAnnotationBlock|null getConstantAnnotationBlock(PhpConstant $constant)

Parameters

PhpConstant $constant

Return Value

PhpAnnotationBlock|null

abstract protected getClassProperties(Property $properties)

Parameters

Property $properties

abstract protected PhpAnnotationBlock|null getPropertyAnnotationBlock(PhpProperty $property)

Parameters

PhpProperty $property

Return Value

PhpAnnotationBlock|null

abstract protected void fillClassMethods()

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

Return Value

void

abstract 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