class Generator implements JsonSerializable (View source)

Properties

protected Wsdl $wsdl Wsdl
protected GeneratorOptions $options
protected GeneratorParsers $parsers Used parsers
protected GeneratorFiles $files Used files
protected GeneratorContainers $containers Used containers
protected GeneratorSoapClient $soapClient Used SoapClient

Methods

__construct(GeneratorOptions $options)

Constructor

initialize()

No description

initSoapClient()

No description

initContainers()

No description

initParsers()

No description

getParsers()

No description

initFiles()

No description

getFiles()

No description

initDirectory()

No description

initWsdl()

No description

doSanityChecks()

No description

doParse()

No description

doGenerate()

No description

generatePackage()

Generates all classes based on options

parse()

Only parses what has to be parsed, called before actually generating the package

Struct|null
getStructByName(string $structName)

Gets the struct by its name Starting from issue #157, we know call getVirtual secondly as structs are now betterly parsed and so is their inheritance/type is detected

Struct|null
getStructByNameAndType(string $structName, string $type)

Gets the struct by its name and type

Service|null
getService(string $serviceName)

Gets a service by its name

Method|null
getServiceMethod(string $methodName)

Returns the method

getServices(bool $usingGatherMethods = false)

No description

getStructs()

No description

string
getOptionCategory()

Sets the optionCategory value

setOptionCategory(string $category)

Sets the optionCategory value

string
getOptionGatherMethods()

Sets the optionGatherMethods value

setOptionGatherMethods(string $gatherMethods)

Sets the optionGatherMethods value

bool
getOptionGenericConstantsNames()

Gets the optionGenericConstantsNames value

setOptionGenericConstantsNames(bool $genericConstantsNames)

Sets the optionGenericConstantsNames value

bool
getOptionGenerateTutorialFile()

Gets the optionGenerateTutorialFile value

setOptionGenerateTutorialFile(bool $generateTutorialFile)

Sets the optionGenerateTutorialFile value

string
getOptionNamespacePrefix()

Gets the optionNamespacePrefix value

setOptionNamespacePrefix(string $namespace)

Sets the optionGenerateTutorialFile value

array
getOptionAddComments()

Gets the optionAddComments value

setOptionAddComments(array $addComments)

Sets the optionAddComments value

bool
getOptionStandalone()

Gets the optionStandalone value

setOptionStandalone(bool $standalone)

Sets the optionStandalone value

bool
getOptionValidation()

Gets the optionValidation value

setOptionValidation(bool $validation)

Sets the optionValidation value

string
getOptionStructClass()

Gets the optionStructClass value

setOptionStructClass(string $structClass)

Sets the optionStructClass value

string
getOptionStructArrayClass()

Gets the optionStructArrayClass value

setOptionStructArrayClass(string $structArrayClass)

Sets the optionStructArrayClass value

string
getOptionSoapClientClass()

Gets the optionSoapClientClass value

setOptionSoapClientClass(string $soapClientClass)

Sets the optionSoapClientClass value

string
getOptionPrefix(bool $ucFirst = true)

Gets the package name prefix

setOptionPrefix(string $optionPrefix)

Sets the package name prefix

string
getOptionSuffix(bool $ucFirst = true)

Gets the package name suffix

setOptionSuffix(string $optionSuffix)

Sets the package name suffix

string
getOptionBasicLogin()

Gets the optionBasicLogin value

setOptionBasicLogin(string $optionBasicLogin)

Sets the optionBasicLogin value

string
getOptionBasicPassword()

Gets the optionBasicPassword value

setOptionBasicPassword(string $optionBasicPassword)

Sets the optionBasicPassword value

string
getOptionProxyHost()

Gets the optionProxyHost value

setOptionProxyHost(string $optionProxyHost)

Sets the optionProxyHost value

string
getOptionProxyPort()

Gets the optionProxyPort value

setOptionProxyPort(string $optionProxyPort)

Sets the optionProxyPort value

string
getOptionProxyLogin()

Gets the optionProxyLogin value

setOptionProxyLogin(string $optionProxyLogin)

Sets the optionProxyLogin value

string
getOptionProxyPassword()

Gets the optionProxyPassword value

setOptionProxyPassword(string $optionProxyPassword)

Sets the optionProxyPassword value

string
getOptionOrigin()

Gets the optionOrigin value

setOptionOrigin(string $optionOrigin)

Sets the optionOrigin value

string
getOptionDestination()

Gets the optionDestination value

setOptionDestination(string $optionDestination)

Sets the optionDestination value

string
getOptionSrcDirname()

Gets the optionSrcDirname value

setOptionSrcDirname(string $optionSrcDirname)

Sets the optionSrcDirname value

array
getOptionSoapOptions()

Gets the optionSoapOptions value

setOptionSoapOptions(array $optionSoapOptions)

Sets the optionSoapOptions value

string
getOptionComposerName()

Gets the optionComposerName value

setOptionComposerName(string $optionComposerName)

Sets the optionComposerName value

array
getOptionComposerSettings()

Gets the optionComposerSettings value

setOptionComposerSettings(array $optionComposerSettings = [])

Sets the optionComposerSettings value

string
getOptionStructsFolder()

Gets the optionStructsFolder value

setOptionStructsFolder(string $optionStructsFolder)

Sets the optionStructsFolder value

string
getOptionArraysFolder()

Gets the optionArraysFolder value

setOptionArraysFolder(string $optionArraysFolder)

Sets the optionArraysFolder value

string
getOptionEnumsFolder()

Gets the optionEnumsFolder value

setOptionEnumsFolder(string $optionEnumsFolder)

Sets the optionEnumsFolder value

string
getOptionServicesFolder()

Gets the optionServicesFolder value

setOptionServicesFolder(string $optionServicesFolder)

Sets the optionServicesFolder value

bool
getOptionSchemasSave()

Gets the optionSchemasSave value

setOptionSchemasSave(bool $optionSchemasSave)

Sets the optionSchemasSave value

string
getOptionSchemasFolder()

Gets the optionSchemasFolder value

setOptionSchemasFolder(string $optionSchemasFolder)

Sets the optionSchemasFolder value

string
getOptionXsdTypesPath()

Gets the optionXsdTypesPath value

setOptionXsdTypesPath(string $xsdTypesPath)

Sets the optionXsdTypesPath value

Wsdl|null
getWsdl()

Gets the WSDL

setWsdl(Wsdl $wsdl)

Sets the WSDLs

addSchemaToWsdl(Wsdl $wsdl, string $schemaLocation)

Adds Wsdl location

string
getGather(AbstractModel $model)

Gets gather name class

string
getServiceName(string $methodName)

Returns the service name associated to the method/operation name in order to gather them in one service class

setOptions(GeneratorOptions $options = null)

No description

getOptions()

No description

string
getUrlContent(string $url)

No description

array
jsonSerialize()

No description

static Generator
instanceFromSerializedJson(string $json)

No description

static AbstractModel
getModelInstanceFromJsonArrayEntry(Generator $generator, array $jsonArrayEntry)

No description

Details

__construct(GeneratorOptions $options)

Constructor

Parameters

GeneratorOptions $options

protected Generator initialize()

Return Value

Generator

protected Generator initSoapClient()

Return Value

Generator

Exceptions

InvalidArgumentException

protected Generator initContainers()

Return Value

Generator

protected Generator initParsers()

Return Value

Generator

GeneratorParsers getParsers()

Return Value

GeneratorParsers

protected Generator initFiles()

Return Value

Generator

GeneratorFiles getFiles()

Return Value

GeneratorFiles

protected Generator initDirectory()

Return Value

Generator

Exceptions

InvalidArgumentException

protected Generator initWsdl()

Return Value

Generator

protected Generator doSanityChecks()

Return Value

Generator

protected Generator doParse()

Return Value

Generator

protected Generator doGenerate()

Return Value

Generator

Generator generatePackage()

Generates all classes based on options

Return Value

Generator

Generator parse()

Only parses what has to be parsed, called before actually generating the package

Return Value

Generator

Struct|null getStructByName(string $structName)

Gets the struct by its name Starting from issue #157, we know call getVirtual secondly as structs are now betterly parsed and so is their inheritance/type is detected

Parameters

string $structName the original struct name

Return Value

Struct|null

Struct|null getStructByNameAndType(string $structName, string $type)

Gets the struct by its name and type

Parameters

string $structName the original struct name
string $type the original struct type

Return Value

Struct|null

Service|null getService(string $serviceName)

Gets a service by its name

Parameters

string $serviceName the service name

Return Value

Service|null

Method|null getServiceMethod(string $methodName)

Returns the method

Parameters

string $methodName the original function name

Return Value

Method|null

Service getServices(bool $usingGatherMethods = false)

Parameters

bool $usingGatherMethods allows to gather methods within a single service if gather_methods options is set to true

Return Value

Service

Struct getStructs()

Return Value

Struct

string getOptionCategory()

Sets the optionCategory value

Return Value

string

Generator setOptionCategory(string $category)

Sets the optionCategory value

Parameters

string $category

Return Value

Generator

string getOptionGatherMethods()

Sets the optionGatherMethods value

Return Value

string

Generator setOptionGatherMethods(string $gatherMethods)

Sets the optionGatherMethods value

Parameters

string $gatherMethods

Return Value

Generator

bool getOptionGenericConstantsNames()

Gets the optionGenericConstantsNames value

Return Value

bool

Generator setOptionGenericConstantsNames(bool $genericConstantsNames)

Sets the optionGenericConstantsNames value

Parameters

bool $genericConstantsNames

Return Value

Generator

bool getOptionGenerateTutorialFile()

Gets the optionGenerateTutorialFile value

Return Value

bool

Generator setOptionGenerateTutorialFile(bool $generateTutorialFile)

Sets the optionGenerateTutorialFile value

Parameters

bool $generateTutorialFile

Return Value

Generator

string getOptionNamespacePrefix()

Gets the optionNamespacePrefix value

Return Value

string

Generator setOptionNamespacePrefix(string $namespace)

Sets the optionGenerateTutorialFile value

Parameters

string $namespace

Return Value

Generator

array getOptionAddComments()

Gets the optionAddComments value

Return Value

array

Generator setOptionAddComments(array $addComments)

Sets the optionAddComments value

Parameters

array $addComments

Return Value

Generator

bool getOptionStandalone()

Gets the optionStandalone value

Return Value

bool

Generator setOptionStandalone(bool $standalone)

Sets the optionStandalone value

Parameters

bool $standalone

Return Value

Generator

bool getOptionValidation()

Gets the optionValidation value

Return Value

bool

Generator setOptionValidation(bool $validation)

Sets the optionValidation value

Parameters

bool $validation

Return Value

Generator

string getOptionStructClass()

Gets the optionStructClass value

Return Value

string

Generator setOptionStructClass(string $structClass)

Sets the optionStructClass value

Parameters

string $structClass

Return Value

Generator

string getOptionStructArrayClass()

Gets the optionStructArrayClass value

Return Value

string

Generator setOptionStructArrayClass(string $structArrayClass)

Sets the optionStructArrayClass value

Parameters

string $structArrayClass

Return Value

Generator

string getOptionSoapClientClass()

Gets the optionSoapClientClass value

Return Value

string

Generator setOptionSoapClientClass(string $soapClientClass)

Sets the optionSoapClientClass value

Parameters

string $soapClientClass

Return Value

Generator

string getOptionPrefix(bool $ucFirst = true)

Gets the package name prefix

Parameters

bool $ucFirst ucfirst package name prefix or not

Return Value

string

Generator setOptionPrefix(string $optionPrefix)

Sets the package name prefix

Parameters

string $optionPrefix

Return Value

Generator

string getOptionSuffix(bool $ucFirst = true)

Gets the package name suffix

Parameters

bool $ucFirst ucfirst package name suffix or not

Return Value

string

Generator setOptionSuffix(string $optionSuffix)

Sets the package name suffix

Parameters

string $optionSuffix

Return Value

Generator

string getOptionBasicLogin()

Gets the optionBasicLogin value

Return Value

string

Generator setOptionBasicLogin(string $optionBasicLogin)

Sets the optionBasicLogin value

Parameters

string $optionBasicLogin

Return Value

Generator

string getOptionBasicPassword()

Gets the optionBasicPassword value

Return Value

string

Generator setOptionBasicPassword(string $optionBasicPassword)

Sets the optionBasicPassword value

Parameters

string $optionBasicPassword

Return Value

Generator

string getOptionProxyHost()

Gets the optionProxyHost value

Return Value

string

Generator setOptionProxyHost(string $optionProxyHost)

Sets the optionProxyHost value

Parameters

string $optionProxyHost

Return Value

Generator

string getOptionProxyPort()

Gets the optionProxyPort value

Return Value

string

Generator setOptionProxyPort(string $optionProxyPort)

Sets the optionProxyPort value

Parameters

string $optionProxyPort

Return Value

Generator

string getOptionProxyLogin()

Gets the optionProxyLogin value

Return Value

string

Generator setOptionProxyLogin(string $optionProxyLogin)

Sets the optionProxyLogin value

Parameters

string $optionProxyLogin

Return Value

Generator

string getOptionProxyPassword()

Gets the optionProxyPassword value

Return Value

string

Generator setOptionProxyPassword(string $optionProxyPassword)

Sets the optionProxyPassword value

Parameters

string $optionProxyPassword

Return Value

Generator

string getOptionOrigin()

Gets the optionOrigin value

Return Value

string

Generator setOptionOrigin(string $optionOrigin)

Sets the optionOrigin value

Parameters

string $optionOrigin

Return Value

Generator

string getOptionDestination()

Gets the optionDestination value

Return Value

string

Generator setOptionDestination(string $optionDestination)

Sets the optionDestination value

Parameters

string $optionDestination

Return Value

Generator

string getOptionSrcDirname()

Gets the optionSrcDirname value

Return Value

string

Generator setOptionSrcDirname(string $optionSrcDirname)

Sets the optionSrcDirname value

Parameters

string $optionSrcDirname

Return Value

Generator

array getOptionSoapOptions()

Gets the optionSoapOptions value

Return Value

array

Generator setOptionSoapOptions(array $optionSoapOptions)

Sets the optionSoapOptions value

Parameters

array $optionSoapOptions

Return Value

Generator

string getOptionComposerName()

Gets the optionComposerName value

Return Value

string

Generator setOptionComposerName(string $optionComposerName)

Sets the optionComposerName value

Parameters

string $optionComposerName

Return Value

Generator

array getOptionComposerSettings()

Gets the optionComposerSettings value

Return Value

array

Generator setOptionComposerSettings(array $optionComposerSettings = [])

Sets the optionComposerSettings value

Parameters

array $optionComposerSettings

Return Value

Generator

string getOptionStructsFolder()

Gets the optionStructsFolder value

Return Value

string

Generator setOptionStructsFolder(string $optionStructsFolder)

Sets the optionStructsFolder value

Parameters

string $optionStructsFolder

Return Value

Generator

string getOptionArraysFolder()

Gets the optionArraysFolder value

Return Value

string

Generator setOptionArraysFolder(string $optionArraysFolder)

Sets the optionArraysFolder value

Parameters

string $optionArraysFolder

Return Value

Generator

string getOptionEnumsFolder()

Gets the optionEnumsFolder value

Return Value

string

Generator setOptionEnumsFolder(string $optionEnumsFolder)

Sets the optionEnumsFolder value

Parameters

string $optionEnumsFolder

Return Value

Generator

string getOptionServicesFolder()

Gets the optionServicesFolder value

Return Value

string

Generator setOptionServicesFolder(string $optionServicesFolder)

Sets the optionServicesFolder value

Parameters

string $optionServicesFolder

Return Value

Generator

bool getOptionSchemasSave()

Gets the optionSchemasSave value

Return Value

bool

Generator setOptionSchemasSave(bool $optionSchemasSave)

Sets the optionSchemasSave value

Parameters

bool $optionSchemasSave

Return Value

Generator

string getOptionSchemasFolder()

Gets the optionSchemasFolder value

Return Value

string

Generator setOptionSchemasFolder(string $optionSchemasFolder)

Sets the optionSchemasFolder value

Parameters

string $optionSchemasFolder

Return Value

Generator

string getOptionXsdTypesPath()

Gets the optionXsdTypesPath value

Return Value

string

Generator setOptionXsdTypesPath(string $xsdTypesPath)

Sets the optionXsdTypesPath value

Parameters

string $xsdTypesPath

Return Value

Generator

Wsdl|null getWsdl()

Gets the WSDL

Return Value

Wsdl|null

protected Generator setWsdl(Wsdl $wsdl)

Sets the WSDLs

Parameters

Wsdl $wsdl

Return Value

Generator

Generator addSchemaToWsdl(Wsdl $wsdl, string $schemaLocation)

Adds Wsdl location

Parameters

Wsdl $wsdl
string $schemaLocation

Return Value

Generator

protected string getGather(AbstractModel $model)

Gets gather name class

Parameters

AbstractModel $model the model for which we generate the folder

Return Value

string

string getServiceName(string $methodName)

Returns the service name associated to the method/operation name in order to gather them in one service class

Parameters

string $methodName original operation/method name

Return Value

string

protected Generator setOptions(GeneratorOptions $options = null)

Parameters

GeneratorOptions $options

Return Value

Generator

GeneratorOptions getOptions()

Return Value

GeneratorOptions

GeneratorSoapClient getSoapClient()

Return Value

GeneratorSoapClient

string getUrlContent(string $url)

Parameters

string $url

Return Value

string

GeneratorContainers getContainers()

Return Value

GeneratorContainers

array jsonSerialize()

Return Value

array

static Generator instanceFromSerializedJson(string $json)

Parameters

string $json

Return Value

Generator

Exceptions

InvalidArgumentException

static protected AbstractModel getModelInstanceFromJsonArrayEntry(Generator $generator, array $jsonArrayEntry)

Parameters

Generator $generator
array $jsonArrayEntry

Return Value

AbstractModel