1 | <?php |
||
2 | /** |
||
3 | * PHP version 7.1 |
||
4 | * |
||
5 | * This source file is subject to the license that is bundled with this package in the file LICENSE. |
||
6 | */ |
||
7 | |||
8 | namespace PhUml\Configuration; |
||
9 | |||
10 | use PhUml\Generators\ClassDiagramGenerator; |
||
11 | use PhUml\Processors\DotProcessor; |
||
12 | use PhUml\Processors\ImageProcessor; |
||
13 | use PhUml\Processors\NeatoProcessor; |
||
14 | |||
15 | class ClassDiagramBuilder extends DigraphBuilder |
||
16 | { |
||
17 | 12 | public function __construct(ClassDiagramConfiguration $configuration) |
|
18 | { |
||
19 | 12 | $this->configuration = $configuration; |
|
20 | 12 | } |
|
21 | |||
22 | 9 | public function classDiagramGenerator(): ClassDiagramGenerator |
|
23 | { |
||
24 | 9 | return new ClassDiagramGenerator( |
|
25 | 9 | $this->codeParser(), |
|
26 | 9 | $this->digraphProcessor(), |
|
27 | 9 | $this->imageProcessor() |
|
28 | ); |
||
29 | } |
||
30 | |||
31 | 9 | private function imageProcessor(): ImageProcessor |
|
32 | { |
||
33 | 9 | return $this->configuration->isDotProcessor() ? new DotProcessor() : new NeatoProcessor(); |
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
34 | } |
||
35 | } |
||
36 |