Complex classes like Generator often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use Generator, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 17 | class Generator implements \JsonSerializable |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Wsdl |
||
| 21 | * @var Wsdl |
||
| 22 | */ |
||
| 23 | private $wsdl; |
||
| 24 | /** |
||
| 25 | * @var GeneratorOptions |
||
| 26 | */ |
||
| 27 | private $options; |
||
| 28 | /** |
||
| 29 | * Used parsers |
||
| 30 | * @var GeneratorParsers |
||
| 31 | */ |
||
| 32 | private $parsers; |
||
| 33 | /** |
||
| 34 | * Used files |
||
| 35 | * @var GeneratorFiles |
||
| 36 | */ |
||
| 37 | private $files; |
||
| 38 | /** |
||
| 39 | * Used containers |
||
| 40 | * @var GeneratorContainers |
||
| 41 | */ |
||
| 42 | private $containers; |
||
| 43 | /** |
||
| 44 | * Used SoapClient |
||
| 45 | * @var GeneratorSoapClient |
||
| 46 | */ |
||
| 47 | private $soapClient; |
||
| 48 | /** |
||
| 49 | * Constructor |
||
| 50 | * @param GeneratorOptions $options |
||
| 51 | */ |
||
| 52 | 828 | public function __construct(GeneratorOptions $options) |
|
| 56 | /** |
||
| 57 | * @return Generator |
||
| 58 | */ |
||
| 59 | 828 | protected function initialize() |
|
| 67 | /** |
||
| 68 | * @throws \InvalidArgumentException |
||
| 69 | * @return Generator |
||
| 70 | */ |
||
| 71 | 828 | protected function initSoapClient() |
|
| 78 | /** |
||
| 79 | * @return Generator |
||
| 80 | */ |
||
| 81 | 828 | protected function initContainers() |
|
| 88 | /** |
||
| 89 | * @return Generator |
||
| 90 | */ |
||
| 91 | 828 | protected function initParsers() |
|
| 98 | /** |
||
| 99 | * @return GeneratorParsers |
||
| 100 | */ |
||
| 101 | 288 | public function getParsers() |
|
| 105 | /** |
||
| 106 | * @return Generator |
||
| 107 | */ |
||
| 108 | 828 | protected function initFiles() |
|
| 115 | /** |
||
| 116 | * @return GeneratorFiles |
||
| 117 | */ |
||
| 118 | 72 | public function getFiles() |
|
| 122 | /** |
||
| 123 | * @throws \InvalidArgumentException |
||
| 124 | * @return Generator |
||
| 125 | */ |
||
| 126 | 42 | protected function initDirectory() |
|
| 134 | /** |
||
| 135 | * @return Generator |
||
| 136 | */ |
||
| 137 | 828 | protected function initWsdl() |
|
| 142 | /** |
||
| 143 | * @return Generator |
||
| 144 | */ |
||
| 145 | 54 | protected function doSanityChecks() |
|
| 157 | /** |
||
| 158 | * @return Generator |
||
| 159 | */ |
||
| 160 | 36 | protected function doParse() |
|
| 165 | /** |
||
| 166 | * @return Generator |
||
| 167 | */ |
||
| 168 | 36 | protected function doGenerate() |
|
| 173 | /** |
||
| 174 | * Generates all classes based on options |
||
| 175 | * @return Generator |
||
| 176 | */ |
||
| 177 | 54 | public function generatePackage() |
|
| 178 | { |
||
| 179 | 54 | return $this |
|
| 180 | ->doSanityChecks() |
||
| 181 | ->parse() |
||
| 182 | ->initDirectory() |
||
| 183 | ->doGenerate(); |
||
| 184 | } |
||
| 185 | /** |
||
| 186 | * Only parses what has to be parsed, called before actually generating the package |
||
| 187 | 654 | * @return Generator |
|
| 188 | */ |
||
| 189 | 654 | public function parse() |
|
| 190 | { |
||
| 191 | return $this->doParse(); |
||
| 192 | } |
||
| 193 | /** |
||
| 194 | * Gets the struct by its name |
||
| 195 | * @uses Generator::getStructs() |
||
| 196 | 528 | * @param string $structName the original struct name |
|
| 197 | * @return Struct|null |
||
| 198 | 528 | */ |
|
| 199 | public function getStruct($structName) |
||
| 200 | { |
||
| 201 | return $this->getStructs()->getStructByName($structName); |
||
| 202 | } |
||
| 203 | /** |
||
| 204 | * Gets a service by its name |
||
| 205 | * @param string $serviceName the service name |
||
| 206 | * @return Service|null |
||
| 207 | */ |
||
| 208 | 522 | public function getService($serviceName) |
|
| 212 | /** |
||
| 213 | * Returns the method |
||
| 214 | * @uses Generator::getServiceName() |
||
| 215 | 738 | * @uses Generator::getService() |
|
| 216 | * @uses Service::getMethod() |
||
| 217 | 738 | * @param string $methodName the original function name |
|
| 218 | * @return Method|null |
||
| 219 | */ |
||
| 220 | public function getServiceMethod($methodName) |
||
| 221 | { |
||
| 222 | 762 | return $this->getService($this->getServiceName($methodName)) instanceof Service ? $this->getService($this->getServiceName($methodName))->getMethod($methodName) : null; |
|
| 223 | } |
||
| 224 | 762 | /** |
|
| 225 | * @return ServiceContainer |
||
| 226 | */ |
||
| 227 | public function getServices() |
||
| 228 | { |
||
| 229 | return $this->containers->getServices(); |
||
| 230 | 462 | } |
|
| 231 | /** |
||
| 232 | 462 | * @return StructContainer |
|
| 233 | */ |
||
| 234 | public function getStructs() |
||
| 235 | { |
||
| 236 | return $this->containers->getStructs(); |
||
| 237 | } |
||
| 238 | /** |
||
| 239 | 432 | * Sets the optionCategory value |
|
| 240 | * @return string |
||
| 241 | 432 | */ |
|
| 242 | 432 | public function getOptionCategory() |
|
| 243 | { |
||
| 244 | return $this->options->getCategory(); |
||
| 245 | } |
||
| 246 | /** |
||
| 247 | * Sets the optionCategory value |
||
| 248 | 750 | * @param string $category |
|
| 249 | * @return Generator |
||
| 250 | 750 | */ |
|
| 251 | public function setOptionCategory($category) |
||
| 252 | { |
||
| 253 | $this->options->setCategory($category); |
||
| 254 | return $this; |
||
| 255 | } |
||
| 256 | /** |
||
| 257 | 432 | * Sets the optionGatherMethods value |
|
| 258 | * @return string |
||
| 259 | 432 | */ |
|
| 260 | 432 | public function getOptionGatherMethods() |
|
| 261 | { |
||
| 262 | return $this->options->getGatherMethods(); |
||
| 263 | } |
||
| 264 | /** |
||
| 265 | * Sets the optionGatherMethods value |
||
| 266 | 96 | * @param string $gatherMethods |
|
| 267 | * @return Generator |
||
| 268 | 96 | */ |
|
| 269 | public function setOptionGatherMethods($gatherMethods) |
||
| 270 | { |
||
| 271 | $this->options->setGatherMethods($gatherMethods); |
||
| 272 | return $this; |
||
| 273 | } |
||
| 274 | /** |
||
| 275 | 12 | * Gets the optionGenericConstantsNames value |
|
| 276 | * @return bool |
||
| 277 | 12 | */ |
|
| 278 | 12 | public function getOptionGenericConstantsNames() |
|
| 279 | { |
||
| 280 | return $this->options->getGenericConstantsName(); |
||
| 281 | } |
||
| 282 | /** |
||
| 283 | * Sets the optionGenericConstantsNames value |
||
| 284 | 48 | * @param bool $genericConstantsNames |
|
| 285 | * @return Generator |
||
| 286 | 48 | */ |
|
| 287 | public function setOptionGenericConstantsNames($genericConstantsNames) |
||
| 288 | { |
||
| 289 | $this->options->setGenericConstantsName($genericConstantsNames); |
||
| 290 | return $this; |
||
| 291 | } |
||
| 292 | /** |
||
| 293 | 6 | * Gets the optionGenerateTutorialFile value |
|
| 294 | * @return bool |
||
| 295 | 6 | */ |
|
| 296 | 6 | public function getOptionGenerateTutorialFile() |
|
| 297 | { |
||
| 298 | return $this->options->getGenerateTutorialFile(); |
||
| 299 | } |
||
| 300 | /** |
||
| 301 | * Sets the optionGenerateTutorialFile value |
||
| 302 | 426 | * @param bool $generateTutorialFile |
|
| 303 | * @return Generator |
||
| 304 | 426 | */ |
|
| 305 | public function setOptionGenerateTutorialFile($generateTutorialFile) |
||
| 306 | { |
||
| 307 | $this->options->setGenerateTutorialFile($generateTutorialFile); |
||
| 308 | return $this; |
||
| 309 | } |
||
| 310 | /** |
||
| 311 | 30 | * Gets the optionNamespacePrefix value |
|
| 312 | * @return string |
||
| 313 | 30 | */ |
|
| 314 | 30 | public function getOptionNamespacePrefix() |
|
| 315 | { |
||
| 316 | return $this->options->getNamespace(); |
||
| 317 | } |
||
| 318 | /** |
||
| 319 | * Sets the optionGenerateTutorialFile value |
||
| 320 | 336 | * @param string $namespace |
|
| 321 | * @return Generator |
||
| 322 | 336 | */ |
|
| 323 | public function setOptionNamespacePrefix($namespace) |
||
| 324 | { |
||
| 325 | $this->options->setNamespace($namespace); |
||
| 326 | return $this; |
||
| 327 | } |
||
| 328 | /** |
||
| 329 | 432 | * Gets the optionAddComments value |
|
| 330 | * @return array |
||
| 331 | 432 | */ |
|
| 332 | 432 | public function getOptionAddComments() |
|
| 333 | { |
||
| 334 | return $this->options->getAddComments(); |
||
| 335 | } |
||
| 336 | /** |
||
| 337 | * Sets the optionAddComments value |
||
| 338 | 96 | * @param array $addComments |
|
| 339 | * @return Generator |
||
| 340 | 96 | */ |
|
| 341 | public function setOptionAddComments($addComments) |
||
| 342 | { |
||
| 343 | $this->options->setAddComments($addComments); |
||
| 344 | return $this; |
||
| 345 | } |
||
| 346 | /** |
||
| 347 | 12 | * Gets the optionStandalone value |
|
| 348 | * @return bool |
||
| 349 | 12 | */ |
|
| 350 | 12 | public function getOptionStandalone() |
|
| 351 | { |
||
| 352 | return $this->options->getStandalone(); |
||
| 353 | } |
||
| 354 | /** |
||
| 355 | * Sets the optionStandalone value |
||
| 356 | 198 | * @param bool $standalone |
|
| 357 | * @return Generator |
||
| 358 | 198 | */ |
|
| 359 | public function setOptionStandalone($standalone) |
||
| 360 | { |
||
| 361 | $this->options->setStandalone($standalone); |
||
| 362 | return $this; |
||
| 363 | } |
||
| 364 | /** |
||
| 365 | 42 | * Gets the optionValidation value |
|
| 366 | * @return bool |
||
| 367 | 42 | */ |
|
| 368 | 42 | public function getOptionValidation() |
|
| 369 | { |
||
| 370 | return $this->options->getValidation(); |
||
| 371 | } |
||
| 372 | /** |
||
| 373 | * Sets the optionValidation value |
||
| 374 | 168 | * @param bool $validation |
|
| 375 | * @return Generator |
||
| 376 | 168 | */ |
|
| 377 | public function setOptionValidation($validation) |
||
| 378 | { |
||
| 379 | $this->options->setValidation($validation); |
||
| 380 | return $this; |
||
| 381 | } |
||
| 382 | /** |
||
| 383 | 18 | * Gets the optionStructClass value |
|
| 384 | * @return string |
||
| 385 | 18 | */ |
|
| 386 | 18 | public function getOptionStructClass() |
|
| 387 | { |
||
| 388 | return $this->options->getStructClass(); |
||
| 389 | } |
||
| 390 | /** |
||
| 391 | * Sets the optionStructClass value |
||
| 392 | 60 | * @param string $structClass |
|
| 393 | * @return Generator |
||
| 394 | 60 | */ |
|
| 395 | public function setOptionStructClass($structClass) |
||
| 396 | { |
||
| 397 | $this->options->setStructClass($structClass); |
||
| 398 | return $this; |
||
| 399 | } |
||
| 400 | /** |
||
| 401 | 6 | * Gets the optionStructArrayClass value |
|
| 402 | * @return string |
||
| 403 | 6 | */ |
|
| 404 | 6 | public function getOptionStructArrayClass() |
|
| 405 | { |
||
| 406 | return $this->options->getStructArrayClass(); |
||
| 407 | } |
||
| 408 | /** |
||
| 409 | * Sets the optionStructArrayClass value |
||
| 410 | 144 | * @param string $structArrayClass |
|
| 411 | * @return Generator |
||
| 412 | 144 | */ |
|
| 413 | public function setOptionStructArrayClass($structArrayClass) |
||
| 414 | { |
||
| 415 | $this->options->setStructArrayClass($structArrayClass); |
||
| 416 | return $this; |
||
| 417 | } |
||
| 418 | /** |
||
| 419 | 6 | * Gets the optionSoapClientClass value |
|
| 420 | * @return string |
||
| 421 | 6 | */ |
|
| 422 | 6 | public function getOptionSoapClientClass() |
|
| 423 | { |
||
| 424 | return $this->options->getSoapClientClass(); |
||
| 425 | } |
||
| 426 | /** |
||
| 427 | * Sets the optionSoapClientClass value |
||
| 428 | * @param string $soapClientClass |
||
| 429 | 864 | * @return Generator |
|
| 430 | */ |
||
| 431 | 864 | public function setOptionSoapClientClass($soapClientClass) |
|
| 432 | { |
||
| 433 | $this->options->setSoapClientClass($soapClientClass); |
||
| 434 | return $this; |
||
| 435 | } |
||
| 436 | /** |
||
| 437 | * Gets the package name prefix |
||
| 438 | 480 | * @param bool $ucFirst ucfirst package name prefix or not |
|
| 439 | * @return string |
||
| 440 | 480 | */ |
|
| 441 | 480 | public function getOptionPrefix($ucFirst = true) |
|
| 442 | { |
||
| 443 | return $ucFirst ? ucfirst($this->getOptions()->getPrefix()) : $this->getOptions()->getPrefix(); |
||
| 444 | } |
||
| 445 | /** |
||
| 446 | * Sets the package name prefix |
||
| 447 | * @param string $optionPrefix |
||
| 448 | 828 | * @return Generator |
|
| 449 | */ |
||
| 450 | 828 | public function setOptionPrefix($optionPrefix) |
|
| 451 | { |
||
| 452 | $this->options->setPrefix($optionPrefix); |
||
| 453 | return $this; |
||
| 454 | } |
||
| 455 | /** |
||
| 456 | * Gets the package name suffix |
||
| 457 | 42 | * @param bool $ucFirst ucfirst package name suffix or not |
|
| 458 | * @return string |
||
| 459 | 42 | */ |
|
| 460 | 42 | public function getOptionSuffix($ucFirst = true) |
|
| 461 | { |
||
| 462 | return $ucFirst ? ucfirst($this->getOptions()->getSuffix()) : $this->getOptions()->getSuffix(); |
||
| 463 | } |
||
| 464 | /** |
||
| 465 | * Sets the package name suffix |
||
| 466 | 852 | * @param string $optionSuffix |
|
| 467 | * @return Generator |
||
| 468 | 852 | */ |
|
| 469 | public function setOptionSuffix($optionSuffix) |
||
| 470 | { |
||
| 471 | $this->options->setSuffix($optionSuffix); |
||
| 472 | return $this; |
||
| 473 | } |
||
| 474 | /** |
||
| 475 | 6 | * Gets the optionBasicLogin value |
|
| 476 | * @return string |
||
| 477 | 6 | */ |
|
| 478 | 6 | public function getOptionBasicLogin() |
|
| 479 | { |
||
| 480 | return $this->options->getBasicLogin(); |
||
| 481 | } |
||
| 482 | /** |
||
| 483 | * Sets the optionBasicLogin value |
||
| 484 | 852 | * @param string $optionBasicLogin |
|
| 485 | * @return Generator |
||
| 486 | 852 | */ |
|
| 487 | public function setOptionBasicLogin($optionBasicLogin) |
||
| 488 | { |
||
| 489 | $this->options->setBasicLogin($optionBasicLogin); |
||
| 490 | return $this; |
||
| 491 | } |
||
| 492 | /** |
||
| 493 | 6 | * Gets the optionBasicPassword value |
|
| 494 | * @return string |
||
| 495 | 6 | */ |
|
| 496 | 6 | public function getOptionBasicPassword() |
|
| 497 | { |
||
| 498 | return $this->options->getBasicPassword(); |
||
| 499 | } |
||
| 500 | /** |
||
| 501 | * Sets the optionBasicPassword value |
||
| 502 | 852 | * @param string $optionBasicPassword |
|
| 503 | * @return Generator |
||
| 504 | 852 | */ |
|
| 505 | public function setOptionBasicPassword($optionBasicPassword) |
||
| 506 | { |
||
| 507 | $this->options->setBasicPassword($optionBasicPassword); |
||
| 508 | return $this; |
||
| 509 | } |
||
| 510 | /** |
||
| 511 | 6 | * Gets the optionProxyHost value |
|
| 512 | * @return string |
||
| 513 | 6 | */ |
|
| 514 | 6 | public function getOptionProxyHost() |
|
| 515 | { |
||
| 516 | return $this->options->getProxyHost(); |
||
| 517 | } |
||
| 518 | /** |
||
| 519 | * Sets the optionProxyHost value |
||
| 520 | 852 | * @param string $optionProxyHost |
|
| 521 | * @return Generator |
||
| 522 | 852 | */ |
|
| 523 | public function setOptionProxyHost($optionProxyHost) |
||
| 524 | { |
||
| 525 | $this->options->setProxyHost($optionProxyHost); |
||
| 526 | return $this; |
||
| 527 | } |
||
| 528 | /** |
||
| 529 | 6 | * Gets the optionProxyPort value |
|
| 530 | * @return string |
||
| 531 | 6 | */ |
|
| 532 | 6 | public function getOptionProxyPort() |
|
| 533 | { |
||
| 534 | return $this->options->getProxyPort(); |
||
| 535 | } |
||
| 536 | /** |
||
| 537 | * Sets the optionProxyPort value |
||
| 538 | 852 | * @param string $optionProxyPort |
|
| 539 | * @return Generator |
||
| 540 | 852 | */ |
|
| 541 | public function setOptionProxyPort($optionProxyPort) |
||
| 542 | { |
||
| 543 | $this->options->setProxyPort($optionProxyPort); |
||
| 544 | return $this; |
||
| 545 | } |
||
| 546 | /** |
||
| 547 | 6 | * Gets the optionProxyLogin value |
|
| 548 | * @return string |
||
| 549 | 6 | */ |
|
| 550 | 6 | public function getOptionProxyLogin() |
|
| 551 | { |
||
| 552 | return $this->options->getProxyLogin(); |
||
| 553 | } |
||
| 554 | /** |
||
| 555 | * Sets the optionProxyLogin value |
||
| 556 | 852 | * @param string $optionProxyLogin |
|
| 557 | * @return Generator |
||
| 558 | 852 | */ |
|
| 559 | public function setOptionProxyLogin($optionProxyLogin) |
||
| 560 | { |
||
| 561 | $this->options->setProxyLogin($optionProxyLogin); |
||
| 562 | return $this; |
||
| 563 | } |
||
| 564 | /** |
||
| 565 | 6 | * Gets the optionProxyPassword value |
|
| 566 | * @return string |
||
| 567 | 6 | */ |
|
| 568 | 6 | public function getOptionProxyPassword() |
|
| 569 | { |
||
| 570 | return $this->options->getProxyPassword(); |
||
| 571 | } |
||
| 572 | /** |
||
| 573 | * Sets the optionProxyPassword value |
||
| 574 | 846 | * @param string $optionProxyPassword |
|
| 575 | * @return Generator |
||
| 576 | 846 | */ |
|
| 577 | public function setOptionProxyPassword($optionProxyPassword) |
||
| 578 | { |
||
| 579 | $this->options->setProxyPassword($optionProxyPassword); |
||
| 580 | return $this; |
||
| 581 | } |
||
| 582 | /** |
||
| 583 | 6 | * Gets the optionOrigin value |
|
| 584 | * @return string |
||
| 585 | 6 | */ |
|
| 586 | 6 | public function getOptionOrigin() |
|
| 590 | /** |
||
| 591 | * Sets the optionOrigin value |
||
| 592 | * @param string $optionOrigin |
||
| 593 | 486 | * @return Generator |
|
| 594 | */ |
||
| 595 | 486 | public function setOptionOrigin($optionOrigin) |
|
| 596 | 486 | { |
|
| 597 | 480 | $this->options->setOrigin($optionOrigin); |
|
| 598 | 320 | $this->initWsdl(); |
|
| 599 | 486 | return $this; |
|
| 600 | } |
||
| 601 | /** |
||
| 602 | * Gets the optionDestination value |
||
| 603 | * @return string |
||
| 604 | */ |
||
| 605 | public function getOptionDestination() |
||
| 606 | 18 | { |
|
| 607 | $destination = $this->options->getDestination(); |
||
| 608 | 18 | if (!empty($destination)) { |
|
| 609 | 12 | $destination = rtrim($destination, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; |
|
| 610 | 8 | } |
|
| 611 | 6 | return $destination; |
|
| 612 | } |
||
| 613 | 12 | /** |
|
| 614 | * Sets the optionDestination value |
||
| 615 | * @param string $optionDestination |
||
| 616 | * @return Generator |
||
| 617 | */ |
||
| 618 | public function setOptionDestination($optionDestination) |
||
| 619 | 426 | { |
|
| 620 | if (!empty($optionDestination)) { |
||
| 621 | 426 | $this->options->setDestination(rtrim($optionDestination, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR); |
|
| 622 | } else { |
||
| 623 | throw new \InvalidArgumentException('Package\'s destination can\'t be empty', __LINE__); |
||
| 624 | } |
||
| 625 | return $this; |
||
| 626 | } |
||
| 627 | /** |
||
| 628 | 18 | * Gets the optionSrcDiname value |
|
| 629 | * @return string |
||
| 630 | 18 | */ |
|
| 631 | 18 | public function getOptionSrcDirname() |
|
| 632 | { |
||
| 633 | return $this->options->getSrcDirname(); |
||
| 634 | } |
||
| 635 | /** |
||
| 636 | * Sets the optionSrcDirname value |
||
| 637 | 840 | * @param string $optionSrcDirname |
|
| 638 | * @return Generator |
||
| 639 | 840 | */ |
|
| 640 | public function setOptionSrcDirname($optionSrcDirname) |
||
| 645 | /** |
||
| 646 | 6 | * Gets the optionSoapOptions value |
|
| 647 | * @return string |
||
| 648 | 6 | */ |
|
| 649 | 6 | public function getOptionSoapOptions() |
|
| 653 | /** |
||
| 654 | * Sets the optionSoapOptions value |
||
| 655 | * @param array $optionSoapOptions |
||
| 656 | * @return Generator |
||
| 657 | */ |
||
| 658 | 78 | public function setOptionSoapOptions($optionSoapOptions) |
|
| 666 | /** |
||
| 667 | 42 | * Gets the optionComposerName value |
|
| 668 | * @return string |
||
| 669 | 42 | */ |
|
| 670 | 36 | public function getOptionComposerName() |
|
| 674 | 36 | /** |
|
| 675 | * Sets the optionComposerName value |
||
| 676 | * @param string $optionComposerName |
||
| 677 | * @return Generator |
||
| 678 | */ |
||
| 679 | public function setOptionComposerName($optionComposerName) |
||
| 688 | /** |
||
| 689 | 12 | * Gets the optionComposerSettings value |
|
| 690 | * @return array |
||
| 691 | 12 | */ |
|
| 692 | 12 | public function getOptionComposerSettings() |
|
| 696 | /** |
||
| 697 | * Sets the optionComposerSettings value |
||
| 698 | 420 | * @param array $optionComposerSettings |
|
| 699 | * @return Generator |
||
| 700 | 420 | */ |
|
| 701 | public function setOptionComposerSettings(array $optionComposerSettings = array()) |
||
| 706 | /** |
||
| 707 | 6 | * Gets the optionStructsFolder value |
|
| 708 | * @return string |
||
| 709 | 6 | */ |
|
| 710 | 6 | public function getOptionStructsFolder() |
|
| 714 | /** |
||
| 715 | * Sets the optionStructsFolder value |
||
| 716 | 84 | * @param string $optionStructsFolder |
|
| 717 | * @return Generator |
||
| 718 | 84 | */ |
|
| 719 | public function setOptionStructsFolder($optionStructsFolder) |
||
| 724 | /** |
||
| 725 | 6 | * Gets the optionArraysFolder value |
|
| 726 | * @return string |
||
| 727 | 6 | */ |
|
| 728 | 6 | public function getOptionArraysFolder() |
|
| 732 | /** |
||
| 733 | * Sets the optionArraysFolder value |
||
| 734 | 162 | * @param string $optionArraysFolder |
|
| 735 | * @return Generator |
||
| 736 | 162 | */ |
|
| 737 | public function setOptionArraysFolder($optionArraysFolder) |
||
| 742 | /** |
||
| 743 | 6 | * Gets the optionEnumsFolder value |
|
| 744 | * @return string |
||
| 745 | 6 | */ |
|
| 746 | 6 | public function getOptionEnumsFolder() |
|
| 750 | /** |
||
| 751 | * Sets the optionEnumsFolder value |
||
| 752 | 804 | * @param string $optionEnumsFolder |
|
| 753 | * @return Generator |
||
| 754 | 804 | */ |
|
| 755 | public function setOptionEnumsFolder($optionEnumsFolder) |
||
| 760 | /** |
||
| 761 | 6 | * Gets the optionServicesFolder value |
|
| 762 | * @return string |
||
| 763 | 6 | */ |
|
| 764 | 6 | public function getOptionServicesFolder() |
|
| 768 | /** |
||
| 769 | * Sets the optionServicesFolder value |
||
| 770 | 738 | * @param string $optionServicesFolder |
|
| 771 | * @return Generator |
||
| 772 | 738 | */ |
|
| 773 | public function setOptionServicesFolder($optionServicesFolder) |
||
| 778 | /** |
||
| 779 | 822 | * Gets the WSDL |
|
| 780 | * @return Wsdl|null |
||
| 781 | 822 | */ |
|
| 782 | 822 | public function getWsdl() |
|
| 786 | /** |
||
| 787 | * Sets the WSDLs |
||
| 788 | * @param Wsdl $wsdl |
||
| 789 | * @return Generator |
||
| 790 | 288 | */ |
|
| 791 | protected function setWsdl(Wsdl $wsdl) |
||
| 796 | /** |
||
| 797 | * Adds Wsdl location |
||
| 798 | * @param Wsdl $wsdl |
||
| 799 | * @param string $schemaLocation |
||
| 800 | * @return Generator |
||
| 801 | */ |
||
| 802 | 714 | public function addSchemaToWsdl(Wsdl $wsdl, $schemaLocation) |
|
| 809 | /** |
||
| 810 | * Gets gather name class |
||
| 811 | * @param AbstractModel $model the model for which we generate the folder |
||
| 812 | 738 | * @return string |
|
| 813 | */ |
||
| 814 | 738 | private function getGather(AbstractModel $model) |
|
| 818 | /** |
||
| 819 | * Returns the service name associated to the method/operation name in order to gather them in one service class |
||
| 820 | 828 | * @param string $methodName original operation/method name |
|
| 821 | * @return string |
||
| 822 | 828 | */ |
|
| 823 | 828 | public function getServiceName($methodName) |
|
| 827 | /** |
||
| 828 | 882 | * @param GeneratorOptions $options |
|
| 829 | * @return Generator |
||
| 830 | 882 | */ |
|
| 831 | protected function setOptions(GeneratorOptions $options = null) |
||
| 836 | /** |
||
| 837 | 774 | * @return GeneratorOptions |
|
| 838 | */ |
||
| 839 | public function getOptions() |
||
| 843 | 834 | /** |
|
| 844 | * @return GeneratorSoapClient |
||
| 845 | 834 | */ |
|
| 846 | 12 | public function getSoapClient() |
|
| 850 | 6 | /** |
|
| 851 | * @param string $url |
||
| 852 | * @return string |
||
| 853 | */ |
||
| 854 | public function getUrlContent($url) |
||
| 863 | /** |
||
| 864 | * @return GeneratorContainers |
||
| 865 | */ |
||
| 866 | public function getContainers() |
||
| 870 | /** |
||
| 871 | * @return array |
||
| 872 | */ |
||
| 873 | public function jsonSerialize() |
||
| 880 | /** |
||
| 881 | * @param string $json |
||
| 882 | * @throws \InvalidArgumentException |
||
| 883 | * @return Generator |
||
| 884 | */ |
||
| 885 | public static function instanceFromSerializedJson($json) |
||
| 909 | /** |
||
| 910 | * @param Generator $generator |
||
| 911 | * @param array $jsonArrayEntry |
||
| 912 | * @return AbstractModel |
||
| 913 | */ |
||
| 914 | private static function getModelInstanceFromJsonArrayEntry(Generator $generator, array $jsonArrayEntry) |
||
| 918 | } |
||
| 919 |