1 | <?php |
||
12 | abstract class AbstractParser extends Parser |
||
13 | { |
||
14 | /** |
||
15 | * @var Generator |
||
16 | */ |
||
17 | protected $generator; |
||
18 | /** |
||
19 | * @var AbstractTag[] |
||
20 | */ |
||
21 | protected $tags; |
||
22 | /** |
||
23 | * List of Wsdl parsed for the current tag |
||
24 | * @var array |
||
25 | */ |
||
26 | private $parsedWsdls; |
||
27 | /** |
||
28 | * List of Schema parsed for the current tag |
||
29 | * @var array |
||
30 | */ |
||
31 | private $parsedSchemas; |
||
32 | /** |
||
33 | * |
||
34 | * @param Generator $generator |
||
35 | */ |
||
36 | 452 | public function __construct(Generator $generator) |
|
42 | /** |
||
43 | * The method takes care of looping among WSDLS as much time as it is needed |
||
44 | * @see \WsdlToPhp\PackageGenerator\Generator\ParserInterface::parse() |
||
45 | */ |
||
46 | 392 | final public function parse() |
|
72 | /** |
||
73 | * Actual parsing of the Wsdl |
||
74 | * @param Wsdl $wsdl |
||
75 | */ |
||
76 | abstract protected function parseWsdl(Wsdl $wsdl); |
||
77 | /** |
||
78 | * Actual parsing of the Schema |
||
79 | * @param Wsdl $wsdl |
||
80 | * @param Schema $schema |
||
81 | */ |
||
82 | abstract protected function parseSchema(Wsdl $wsdl, Schema $schema); |
||
83 | /** |
||
84 | * Must return the tag that will be parsed |
||
85 | * @return string |
||
86 | */ |
||
87 | abstract protected function parsingTag(); |
||
88 | /** |
||
89 | * @param array $tags |
||
90 | * @return \WsdlToPhp\PackageGenerator\Parser\Wsdl\AbstractParser |
||
91 | */ |
||
92 | 392 | private function setTags(array $tags) |
|
97 | /** |
||
98 | * @return AbstractTag[] |
||
99 | */ |
||
100 | 392 | public function getTags() |
|
104 | /** |
||
105 | * @param Wsdl $wsdl |
||
106 | * @return AbstractParser |
||
107 | */ |
||
108 | 392 | private function setWsdlAsParsed(Wsdl $wsdl) |
|
116 | /** |
||
117 | * @param Wsdl $wsdl |
||
118 | * @return boolean |
||
119 | */ |
||
120 | 392 | public function isWsdlParsed(Wsdl $wsdl) |
|
127 | /** |
||
128 | * @param Wsdl $wsdl |
||
129 | * @param Schema $schema |
||
130 | * @return AbstractParser |
||
131 | */ |
||
132 | 144 | private function setSchemaAsParsed(Wsdl $wsdl, Schema $schema) |
|
141 | /** |
||
142 | * @param Wsdl $wsdl |
||
143 | * @param Schema $schema |
||
144 | * @return boolean |
||
145 | */ |
||
146 | 144 | public function isSchemaParsed(Wsdl $wsdl, Schema $schema) |
|
154 | } |
||
155 |