| @@ 106-119 (lines=14) @@ | ||
| 103 | } |
|
| 104 | ||
| 105 | ||
| 106 | public function generateOne(ApiRoute $route, array $sections, string $fileName): void |
|
| 107 | { |
|
| 108 | $template = $this->createTemplate('api_docu_one.latte'); |
|
| 109 | ||
| 110 | $template->setParameters([ |
|
| 111 | 'route' => $route, |
|
| 112 | 'sections' => $sections, |
|
| 113 | ]); |
|
| 114 | ||
| 115 | file_put_contents( |
|
| 116 | "{$this->appDir}/{$fileName}.php", |
|
| 117 | $this->getHttpAuthSnippet() . $template |
|
| 118 | ); |
|
| 119 | } |
|
| 120 | ||
| 121 | ||
| 122 | public function generateIndex(array $sections): void |
|
| @@ 122-134 (lines=13) @@ | ||
| 119 | } |
|
| 120 | ||
| 121 | ||
| 122 | public function generateIndex(array $sections): void |
|
| 123 | { |
|
| 124 | $template = $this->createTemplate('api_docu_index.latte'); |
|
| 125 | ||
| 126 | $template->setParameters([ |
|
| 127 | 'sections' => $sections, |
|
| 128 | ]); |
|
| 129 | ||
| 130 | file_put_contents( |
|
| 131 | "{$this->appDir}/index.php", |
|
| 132 | $this->getHttpAuthSnippet() . $template |
|
| 133 | ); |
|
| 134 | } |
|
| 135 | ||
| 136 | ||
| 137 | public function generateSuccess(): void |
|