1 | <?php |
||
23 | class YumlClient implements YumlClientInterface |
||
24 | { |
||
25 | const YUML_POST_URL = 'https://yuml.me/diagram/plain/class'; |
||
26 | const YUML_REDIRECT_URL = 'https://yuml.me/'; |
||
27 | |||
28 | protected $entityManager; |
||
29 | |||
30 | protected $metadataFactory; |
||
31 | |||
32 | protected $metadataGrapher; |
||
33 | |||
34 | /** |
||
35 | * @param EntityManagerInterface $entityManager |
||
36 | * @param ClassMetadataFactoryInterface|null $classMetadataFactory |
||
37 | * @param MetadataGrapherInterface|null $metadataGrapher |
||
38 | */ |
||
39 | 4 | public function __construct( |
|
50 | |||
51 | /** |
||
52 | * Get doctrine metadata as yuml. |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | 1 | public function makeDslText() |
|
60 | |||
61 | /** |
||
62 | * Use yuml.me to generate an image from yuml. |
||
63 | * |
||
64 | * @param string $dsl_text |
||
65 | * |
||
66 | * @return string The url of the generated image. |
||
67 | */ |
||
68 | 1 | public function getGraphUrl($dsl_text) |
|
76 | |||
77 | /** |
||
78 | * @param string $graphUrl |
||
79 | * @param string $filename |
||
80 | * @return mixed |
||
81 | */ |
||
82 | 1 | public function downloadImage($graphUrl, $filename, CurlInterface $curl = null) |
|
89 | |||
90 | /** |
||
91 | * @return array |
||
92 | */ |
||
93 | 1 | private function getMetadata() |
|
97 | |||
98 | /** |
||
99 | * @return array |
||
100 | */ |
||
101 | 1 | private function getClasses() |
|
112 | |||
113 | /** |
||
114 | * @param $classes |
||
115 | * |
||
116 | * @return string |
||
117 | */ |
||
118 | 1 | private function generateGraph($classes) |
|
124 | } |
||
125 |