Permalink
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (28 sloc) 973 Bytes
<h2>Swagger API Documentation</h2>
<table class="table table-striped">
<thead>
<tr>
<th>API</th>
<th>Versions</th>
</tr>
</thead>
<tbody><?php foreach ($this->apis as $api):
$name = $api['name']; ?>
<tr>
<td><?php echo $this->escapeHtml($name) ?></td>
<td><?php
$view = $this;
$versions = array_map(function ($version) use ($name, $view) {
return sprintf(
'<a href="%s">v%s</a>',
$view->url('zf-apigility/swagger/api', array(
'api' => sprintf('%s-v%s', $name, $version),
)),
$view->escapeHtml($version)
);
}, $api['versions']);
echo implode('&nbsp;|&nbsp;', $versions);
?></td>
</tr>
<?php endforeach; ?></tbody>
</table>