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

PARAM_SET_HEADER_NAMESPACE

PARAM_SET_HEADER_MUSTUNDERSTAND

PARAM_SET_HEADER_ACTOR

METHOD_GET_RESULT

Properties

protected Generator $generator from AbstractFile
protected PhpFile $file from AbstractFile
protected Method $methods from AbstractModelFile
protected array $methodNames Method model can't be found in case the original method's name is unclean: - ex: my.operation.name becomes my_operation_name thus the Model from Model\Service::getMethod() can't be found So we store the generated name associated to the original method object

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

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()

No description

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

addSoapHeaderMethods()

No description

addSoapHeaderFromMethod(Method $method)

No description

PhpMethod
getSoapHeaderMethod(string $methodName, string $soapHeaderName, string $soapHeaderNamespace, string $soapHeaderType)

No description

string
getTypeFromName(string $name)

No description

string
getSoapHeaderMethodName(string $soapHeaderName)

No description

addOperationsMethods()

No description

addGetResultMethod()

No description

addMainMethod(Method $method)

No description

addAnnotationBlockForSoapHeaderMethod(PhpAnnotationBlock $annotationBlock, PhpMethod $method)

No description

addAnnotationBlockForOperationMethod(PhpAnnotationBlock $annotationBlock, PhpMethod $method)

No description

addAnnnotationBlockForgetResultMethod(PhpAnnotationBlock $annotationBlock)

No description

string
getServiceReturnTypes()

No description

static string
getOperationMethodReturnType(Method $method, Generator $generator)

No description

Method|null
getModelFromMethod(PhpMethod $method)

No description

setModelFromMethod(PhpMethod $phpMethod, Method $methodModel)

No description

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

See also

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

protected PhpAnnotationBlock|null getConstantAnnotationBlock(PhpConstant $constant)

Parameters

PhpConstant $constant

Return Value

PhpAnnotationBlock|null

See also

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

protected getClassProperties(Property $properties)

Parameters

Property $properties

See also

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

protected PhpAnnotationBlock|null getPropertyAnnotationBlock(PhpProperty $property)

Parameters

PhpProperty $property

Return Value

PhpAnnotationBlock|null

See also

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

protected void fillClassMethods()

Return Value

void

See also

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

protected PhpAnnotationBlock|null getMethodAnnotationBlock(PhpMethod $method)

Parameters

PhpMethod $method

Return Value

PhpAnnotationBlock|null

See also

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

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 Service addSoapHeaderMethods()

Return Value

Service

protected Service addSoapHeaderFromMethod(Method $method)

Parameters

Method $method

Return Value

Service

protected PhpMethod getSoapHeaderMethod(string $methodName, string $soapHeaderName, string $soapHeaderNamespace, string $soapHeaderType)

Parameters

string $methodName
string $soapHeaderName
string $soapHeaderNamespace
string $soapHeaderType

Return Value

PhpMethod

protected string getTypeFromName(string $name)

Parameters

string $name

Return Value

string

protected string getSoapHeaderMethodName(string $soapHeaderName)

Parameters

string $soapHeaderName

Return Value

string

protected Service addOperationsMethods()

Return Value

Service

protected Service addGetResultMethod()

Return Value

Service

protected Service addMainMethod(Method $method)

Parameters

Method $method

Return Value

Service

protected Service addAnnotationBlockForSoapHeaderMethod(PhpAnnotationBlock $annotationBlock, PhpMethod $method)

Parameters

PhpAnnotationBlock $annotationBlock
PhpMethod $method

Return Value

Service

protected Service addAnnotationBlockForOperationMethod(PhpAnnotationBlock $annotationBlock, PhpMethod $method)

Parameters

PhpAnnotationBlock $annotationBlock
PhpMethod $method

Return Value

Service

protected Service addAnnnotationBlockForgetResultMethod(PhpAnnotationBlock $annotationBlock)

Parameters

PhpAnnotationBlock $annotationBlock

Return Value

Service

protected string getServiceReturnTypes()

Return Value

string

static string getOperationMethodReturnType(Method $method, Generator $generator)

Parameters

Method $method
Generator $generator

Return Value

string

protected Method|null getModelFromMethod(PhpMethod $method)

Parameters

PhpMethod $method

Return Value

Method|null

protected Service setModelFromMethod(PhpMethod $phpMethod, Method $methodModel)

Parameters

PhpMethod $phpMethod
Method $methodModel

Return Value

Service