class GeneratorOptions extends AbstractYamlReader implements JsonSerializable (View source)

Constants

VALUE_CAT

Common values used as option's value

VALUE_END

VALUE_FALSE

VALUE_NONE

VALUE_START

VALUE_TRUE

ADD_COMMENTS

Possible option keys

ARRAYS_FOLDER

BASIC_LOGIN

BASIC_PASSWORD

CATEGORY

COMPOSER_NAME

COMPOSER_SETTINGS

DESTINATION

ENUMS_FOLDER

GATHER_METHODS

GENERATE_TUTORIAL_FILE

GENERIC_CONSTANTS_NAME

NAMESPACE_PREFIX

ORIGIN

PREFIX

PROXY_HOST

PROXY_LOGIN

PROXY_PASSWORD

PROXY_PORT

SERVICES_FOLDER

SOAP_CLIENT_CLASS

SOAP_OPTIONS

SRC_DIRNAME

STANDALONE

STRUCT_ARRAY_CLASS

STRUCT_CLASS

STRUCTS_FOLDER

SUFFIX

VALIDATION

SCHEMAS_SAVE

SCHEMAS_FOLDER

XSD_TYPES_PATH

Properties

static protected AbstractYamlReader[] $instances from AbstractYamlReader
protected string $filename Path to file to parse from AbstractYamlReader
protected array $options Generator's options

Methods

__construct(string $filename)

No description

mixed
loadYaml(string $filename)

No description

instance(string $filename = null)

No description

array
parseSimpleArray(string $filename, string $mainKey)

No description

static 
resetInstances()

For tests purpose only!

parseOptions(string $filename)

Parse options for generator

mixed
getOptionValue(string $optionName)

Returns the option value

setOptionValue(string $optionName, mixed $optionValue, array $values = [])

Allows to add an option and set its value

static string
getDefaultConfigurationPath()

No description

string
getCategory()

Get category option value

setCategory(string $category)

Set current category option value

array
getAddComments()

Get add comments option value

setAddComments(array $addComments = [])

Set current add comments option value

string
getGatherMethods()

Get gather methods option value

setGatherMethods(string $gatherMethods)

Set current gather methods option value

bool
getGenerateTutorialFile()

Get generate tutorial file option value

setGenerateTutorialFile(bool $generateTutorialFile)

Set current generate tutorial file option value

string
getNamespace()

Get namespace option value

setNamespace(string $namespace)

Set current namespace option value

bool
getGenericConstantsName()

Get generic constants name option value

setGenericConstantsName(bool $genericConstantsName)

Set current generic constants name option value

bool
getStandalone()

Get standalone option value

setStandalone(bool $standalone)

Set current standalone option value

bool
getValidation()

Get validation option value

setValidation(bool $validation)

Set current validation option value

string
getStructClass()

Get struct class option value

setStructClass(string $structClass)

Set current struct class option value

string
getStructArrayClass()

Get struct array class option value

setStructArrayClass(string $structArrayClass)

Set current struct array class option value

string
getSoapClientClass()

Get struct array class option value

setSoapClientClass(string $soapClientClass)

Set current struct array class option value

string
getOrigin()

Get origin option value

setOrigin(string $origin)

Set current origin option value

string
getDestination()

Get destination option value

setDestination(string $destination)

Set current destination option value

string
getSrcDirname()

Get src dirname option value

setSrcDirname(string $srcDirname)

Set current src dirname option value

string
getPrefix()

Get prefix option value

setPrefix(string $prefix)

Set current prefix option value

string
getSuffix()

Get suffix option value

setSuffix(string $suffix)

Set current suffix option value

string
getBasicLogin()

Get basic login option value

setBasicLogin(string $basicLogin)

Set current basic login option value

string
getBasicPassword()

Get basic password option value

setBasicPassword(string $basicPassword)

Set current basic password option value

string
getProxyHost()

Get basic proxy host option value

setProxyHost(string $proxyHost)

Set current proxy host option value

string
getProxyPort()

Get basic proxy port option value

setProxyPort(string $proxyPort)

Set current proxy port option value

string
getProxyLogin()

Get basic proxy login option value

setProxyLogin(string $proxyLogin)

Set current proxy login option value

string
getProxyPassword()

Get basic proxy password option value

setProxyPassword(string $proxyPassword)

Set current proxy password option value

array
getSoapOptions()

Get basic soap options option value

setSoapOptions(array $soapOptions)

Set current soap options option value

string
getComposerName()

Get composer name option value

setComposerName(string $composerName)

Set current composer name option value

array
getComposerSettings()

Get composer settings option value

setComposerSettings(array $composerSettings = [])

Set current composer settings option value

static 
dotNotationToArray(string $string, mixed $value, array $array)

turns my.key.path to array('my' => array('key' => array('path' => $value)))

string
getStructsFolder()

Get structs folder option value

setStructsFolder(string $structsFolder)

Set current structs folder option value

string
getArraysFolder()

Get arrays folder option value

setArraysFolder(string $arraysFolder)

Set current arrays folder option value

string
getEnumsFolder()

Get enums folder option value

setEnumsFolder(string $enumsFolder)

Set current enums folder option value

string
getServicesFolder()

Get services folder option value

setServicesFolder(string $servicesFolder)

Set current services folder option value

bool
getSchemasSave()

Get schemas save option value

setSchemasSave(bool $saveSchemas)

Set schemas save option value

string
getSchemasFolder()

Get schemas folder option value

setSchemasFolder(string $schemasFolder)

Set schemas folder option value

string
getXsdTypesPath()

Get xsd types path option value

setXsdTypesPath(string $xsdTypesPath)

Set xsd types path option value

string[]
toArray()

No description

jsonSerialize()

No description

Details

protected __construct(string $filename)

Parameters

string $filename options's file to parse

protected mixed loadYaml(string $filename)

Parameters

string $filename

Return Value

mixed

static AbstractYamlReader instance(string $filename = null)

Parameters

string $filename options's file to parse

Return Value

AbstractYamlReader

Exceptions

InvalidArgumentException

protected array parseSimpleArray(string $filename, string $mainKey)

Parameters

string $filename
string $mainKey

Return Value

array

Exceptions

InvalidArgumentException

static resetInstances()

For tests purpose only!

protected GeneratorOptions parseOptions(string $filename)

Parse options for generator

Parameters

string $filename options's file to parse

Return Value

GeneratorOptions

mixed getOptionValue(string $optionName)

Returns the option value

Parameters

string $optionName

Return Value

mixed

Exceptions

InvalidArgumentException

GeneratorOptions setOptionValue(string $optionName, mixed $optionValue, array $values = [])

Allows to add an option and set its value

Parameters

string $optionName
mixed $optionValue
array $values

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

static string getDefaultConfigurationPath()

Return Value

string

string getCategory()

Get category option value

Return Value

string

GeneratorOptions setCategory(string $category)

Set current category option value

Parameters

string $category

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

array getAddComments()

Get add comments option value

Return Value

array

GeneratorOptions setAddComments(array $addComments = [])

Set current add comments option value

Parameters

array $addComments

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getGatherMethods()

Get gather methods option value

Return Value

string

GeneratorOptions setGatherMethods(string $gatherMethods)

Set current gather methods option value

Parameters

string $gatherMethods

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

bool getGenerateTutorialFile()

Get generate tutorial file option value

Return Value

bool

GeneratorOptions setGenerateTutorialFile(bool $generateTutorialFile)

Set current generate tutorial file option value

Parameters

bool $generateTutorialFile

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getNamespace()

Get namespace option value

Return Value

string

GeneratorOptions setNamespace(string $namespace)

Set current namespace option value

Parameters

string $namespace

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

bool getGenericConstantsName()

Get generic constants name option value

Return Value

bool

GeneratorOptions setGenericConstantsName(bool $genericConstantsName)

Set current generic constants name option value

Parameters

bool $genericConstantsName

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

bool getStandalone()

Get standalone option value

Return Value

bool

GeneratorOptions setStandalone(bool $standalone)

Set current standalone option value

Parameters

bool $standalone

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

bool getValidation()

Get validation option value

Return Value

bool

GeneratorOptions setValidation(bool $validation)

Set current validation option value

Parameters

bool $validation

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getStructClass()

Get struct class option value

Return Value

string

GeneratorOptions setStructClass(string $structClass)

Set current struct class option value

Parameters

string $structClass

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getStructArrayClass()

Get struct array class option value

Return Value

string

GeneratorOptions setStructArrayClass(string $structArrayClass)

Set current struct array class option value

Parameters

string $structArrayClass

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getSoapClientClass()

Get struct array class option value

Return Value

string

GeneratorOptions setSoapClientClass(string $soapClientClass)

Set current struct array class option value

Parameters

string $soapClientClass

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getOrigin()

Get origin option value

Return Value

string

GeneratorOptions setOrigin(string $origin)

Set current origin option value

Parameters

string $origin

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getDestination()

Get destination option value

Return Value

string

GeneratorOptions setDestination(string $destination)

Set current destination option value

Parameters

string $destination

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getSrcDirname()

Get src dirname option value

Return Value

string

GeneratorOptions setSrcDirname(string $srcDirname)

Set current src dirname option value

Parameters

string $srcDirname

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getPrefix()

Get prefix option value

Return Value

string

GeneratorOptions setPrefix(string $prefix)

Set current prefix option value

Parameters

string $prefix

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getSuffix()

Get suffix option value

Return Value

string

GeneratorOptions setSuffix(string $suffix)

Set current suffix option value

Parameters

string $suffix

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getBasicLogin()

Get basic login option value

Return Value

string

GeneratorOptions setBasicLogin(string $basicLogin)

Set current basic login option value

Parameters

string $basicLogin

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getBasicPassword()

Get basic password option value

Return Value

string

GeneratorOptions setBasicPassword(string $basicPassword)

Set current basic password option value

Parameters

string $basicPassword

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getProxyHost()

Get basic proxy host option value

Return Value

string

GeneratorOptions setProxyHost(string $proxyHost)

Set current proxy host option value

Parameters

string $proxyHost

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getProxyPort()

Get basic proxy port option value

Return Value

string

GeneratorOptions setProxyPort(string $proxyPort)

Set current proxy port option value

Parameters

string $proxyPort

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getProxyLogin()

Get basic proxy login option value

Return Value

string

GeneratorOptions setProxyLogin(string $proxyLogin)

Set current proxy login option value

Parameters

string $proxyLogin

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getProxyPassword()

Get basic proxy password option value

Return Value

string

GeneratorOptions setProxyPassword(string $proxyPassword)

Set current proxy password option value

Parameters

string $proxyPassword

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

array getSoapOptions()

Get basic soap options option value

Return Value

array

GeneratorOptions setSoapOptions(array $soapOptions)

Set current soap options option value

Parameters

array $soapOptions

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getComposerName()

Get composer name option value

Return Value

string

GeneratorOptions setComposerName(string $composerName)

Set current composer name option value

Parameters

string $composerName

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

array getComposerSettings()

Get composer settings option value

Return Value

array

GeneratorOptions setComposerSettings(array $composerSettings = [])

Set current composer settings option value

Parameters

array $composerSettings

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

static protected dotNotationToArray(string $string, mixed $value, array $array)

turns my.key.path to array('my' => array('key' => array('path' => $value)))

Parameters

string $string
mixed $value
array $array

string getStructsFolder()

Get structs folder option value

Return Value

string

GeneratorOptions setStructsFolder(string $structsFolder)

Set current structs folder option value

Parameters

string $structsFolder

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getArraysFolder()

Get arrays folder option value

Return Value

string

GeneratorOptions setArraysFolder(string $arraysFolder)

Set current arrays folder option value

Parameters

string $arraysFolder

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getEnumsFolder()

Get enums folder option value

Return Value

string

GeneratorOptions setEnumsFolder(string $enumsFolder)

Set current enums folder option value

Parameters

string $enumsFolder

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getServicesFolder()

Get services folder option value

Return Value

string

GeneratorOptions setServicesFolder(string $servicesFolder)

Set current services folder option value

Parameters

string $servicesFolder

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

bool getSchemasSave()

Get schemas save option value

Return Value

bool

GeneratorOptions setSchemasSave(bool $saveSchemas)

Set schemas save option value

Parameters

bool $saveSchemas

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getSchemasFolder()

Get schemas folder option value

Return Value

string

GeneratorOptions setSchemasFolder(string $schemasFolder)

Set schemas folder option value

Parameters

string $schemasFolder

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string getXsdTypesPath()

Get xsd types path option value

Return Value

string

GeneratorOptions setXsdTypesPath(string $xsdTypesPath)

Set xsd types path option value

Parameters

string $xsdTypesPath

Return Value

GeneratorOptions

Exceptions

InvalidArgumentException

string[] toArray()

Return Value

string[]

jsonSerialize()