1 | <?php |
||
5 | class Structs extends AbstractParser |
||
6 | { |
||
7 | /** |
||
8 | * @var string |
||
9 | */ |
||
10 | const STRUCT_DECLARATION = 'struct'; |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | const UNION_DECLARATION = 'union'; |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | const ANY_XML_DECLARATION = '<anyXML>'; |
||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | const ANY_XML_TYPE = '\DOMDocument'; |
||
23 | /** |
||
24 | * @var string[] |
||
25 | */ |
||
26 | private $definedStructs = array(); |
||
27 | 464 | /** |
|
28 | * Parses the SoapClient types |
||
29 | 464 | * @see \WsdlToPhp\PackageGenerator\Parser\ParserInterface::parse() |
|
30 | 464 | */ |
|
31 | 464 | public function parse() |
|
44 | /** |
||
45 | 448 | * @param string $type |
|
46 | 448 | */ |
|
47 | 448 | protected function parseType($type) |
|
65 | 444 | /** |
|
66 | 444 | * @param array $typeDef |
|
67 | 444 | */ |
|
68 | 444 | protected function parseComplexStruct($typeDef) |
|
81 | /** |
||
82 | * union types are passed such as ",dateTime,time" or ",PMS_ResStatusType,TransactionActionType,UpperCaseAlphaLength1to2" |
||
83 | * @param array $typeDef |
||
84 | 448 | */ |
|
85 | protected function parseUnionStruct($typeDef) |
||
97 | 448 | /** |
|
98 | * Remove useless break line, tabs |
||
99 | * Remove curly braces |
||
100 | * Remove brackets |
||
101 | * Adds space before semicolon to parse it |
||
102 | * Remove duplicated spaces |
||
103 | 448 | * @param string $type |
|
104 | * @return string |
||
105 | 448 | */ |
|
106 | protected static function cleanType($type) |
||
121 | /** |
||
122 | 448 | * @param string $type |
|
123 | * @return boolean |
||
124 | */ |
||
125 | private function isStructDefined($type) |
||
129 | /** |
||
130 | * @param string $type |
||
131 | * @return Structs |
||
132 | */ |
||
133 | private function structHasBeenDefined($type) |
||
138 | /** |
||
139 | * @param string $type |
||
140 | * @return string |
||
141 | */ |
||
142 | private static function typeSignature($type) |
||
146 | } |
||
147 |