Verified Commit 1b5720de authored by Elias Häußler's avatar Elias Häußler 🐛

[TASK] Build docs for all versions and add link to GitHub repository

parent c27287f9
......@@ -2,7 +2,7 @@
/**
* Copyright (c) 2019 Elias Häußler <elias@haeussler.dev>. All rights reserved.
*/
define('CLASSES_PATH', 'src/classes');
define('CLASSES_PATH', 'src');
define('SOURCE_PATH', __DIR__ . '/' . CLASSES_PATH);
define('DOCS_DIR', __DIR__ . '/docs');
......@@ -11,8 +11,17 @@ $iterator = \Symfony\Component\Finder\Finder::create()
->name('*.php')
->in(SOURCE_PATH);
$versions = (new \Sami\Version\GitVersionCollection(__DIR__))
->addFromTags(function ($version) {
return strpos($version, '0') != 0;
})
->add('master');
return new \Sami\Sami($iterator, [
'versions' => $versions,
'title' => 'elias-haeussler.de API',
'build_dir' => DOCS_DIR . '/php',
'cache_dir' => DOCS_DIR . '/cache',
'build_dir' => DOCS_DIR . '/php/%version%',
'cache_dir' => DOCS_DIR . '/cache/%version%',
'remote_repository' => new \Sami\RemoteRepository\GitHubRemoteRepository('eliashaeussler/api', __DIR__),
'default_opened_level' => 2,
]);
......@@ -9,6 +9,7 @@ Version numbers are based on [Semantic Versioning](https://semver.org).
### Updated
- Sami is now required by Composer
- PHP code documentation is now built for all available versions and source files are linked with GitHub repository
......
......@@ -31,6 +31,7 @@ The API serves different endpoints which can be accessed from various clients.
+ [`database:schema`](#databaseschema)
+ [`logfile:clear`](#logfileclear)
+ [`scheduler:run`](#schedulerrun)
- [Documentation](#documentation)
- [Changelog](#changelog)
- [License](#license)
......@@ -270,6 +271,12 @@ the appropriated constraints are AND-combined.
```
## Documentation
The whole API documentation for all available versions can be found at
[docs.elias-haeussler.de](https://docs.elias-haeussler.de/api/php/master).
## Changelog
All notable changes can be seen at the [Changelog](CHANGELOG.md).
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>EliasHaeussler | elias-haeussler.de API</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="css/sami.css">
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/typeahead.min.js"></script>
<script src="sami.js"></script>
<meta name="MobileOptimized" content="width">
<meta name="HandheldFriendly" content="true">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
</head>
<body id="namespace" data-name="namespace:EliasHaeussler" data-root-path="">
<div id="content">
<div id="left-column">
<div id="control-panel">
<form action="#" method="GET">
<select id="version-switcher" name="version">
<option value="../1.0.0/index.html" data-version="1.0.0">1.0.0</option>
<option value="../2.0.0/index.html" data-version="2.0.0">2.0.0</option>
<option value="../3.0.0/index.html" data-version="3.0.0">3.0.0</option>
<option value="../3.1.0/index.html" data-version="3.1.0">3.1.0</option>
<option value="../4.0.0/index.html" data-version="4.0.0">4.0.0</option>
<option value="../4.0.1/index.html" data-version="4.0.1">4.0.1</option>
<option value="../4.0.2/index.html" data-version="4.0.2">4.0.2</option>
<option value="../4.1.0/index.html" data-version="4.1.0">4.1.0</option>
<option value="../4.2.0/index.html" data-version="4.2.0">4.2.0</option>
<option value="../4.3.0/index.html" data-version="4.3.0">4.3.0</option>
<option value="../master/index.html" data-version="master">master</option>
</select>
</form>
<script>
$('option[data-version="'+window.projectVersion+'"]').prop('selected', true);
</script>
<form id="search-form" action="search.html" method="GET">
<span class="glyphicon glyphicon-search"></span>
<input name="search"
class="typeahead form-control"
type="search"
placeholder="Search">
</form>
</div>
<div id="api-tree"></div>
</div>
<div id="right-column">
<nav id="site-nav" class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">elias-haeussler.de API</a>
</div>
<div class="collapse navbar-collapse" id="navbar-elements">
<ul class="nav navbar-nav">
<li><a href="classes.html">Classes</a></li>
<li><a href="namespaces.html">Namespaces</a></li>
<li><a href="interfaces.html">Interfaces</a></li>
<li><a href="traits.html">Traits</a></li>
<li><a href="doc-index.html">Index</a></li>
<li><a href="search.html">Search</a></li>
</ul>
</div>
</div>
</nav>
<div class="namespace-breadcrumbs">
<ol class="breadcrumb">
<li><span class="label label-default">Namespace</span></li>
<li><a href="EliasHaeussler.html">EliasHaeussler</a></li><li class="backslash">\</li>
</ol>
</div>
<div id="page-content">
<div class="page-header">
<h1>EliasHaeussler</h1>
</div>
<h2>Namespaces</h2>
<div class="namespace-list">
<a href="EliasHaeussler/Api.html">EliasHaeussler\Api</a> </div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/">Sami, the API Documentation Generator</a>.
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>EliasHaeussler\Api | elias-haeussler.de API</title>
<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="../css/sami.css">
<script src="../js/jquery-1.11.1.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/typeahead.min.js"></script>
<script src="../sami.js"></script>
<meta name="MobileOptimized" content="width">
<meta name="HandheldFriendly" content="true">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
</head>
<body id="namespace" data-name="namespace:EliasHaeussler_Api" data-root-path="../">
<div id="content">
<div id="left-column">
<div id="control-panel">
<form action="#" method="GET">
<select id="version-switcher" name="version">
<option value="../../1.0.0/index.html" data-version="1.0.0">1.0.0</option>
<option value="../../2.0.0/index.html" data-version="2.0.0">2.0.0</option>
<option value="../../3.0.0/index.html" data-version="3.0.0">3.0.0</option>
<option value="../../3.1.0/index.html" data-version="3.1.0">3.1.0</option>
<option value="../../4.0.0/index.html" data-version="4.0.0">4.0.0</option>
<option value="../../4.0.1/index.html" data-version="4.0.1">4.0.1</option>
<option value="../../4.0.2/index.html" data-version="4.0.2">4.0.2</option>
<option value="../../4.1.0/index.html" data-version="4.1.0">4.1.0</option>
<option value="../../4.2.0/index.html" data-version="4.2.0">4.2.0</option>
<option value="../../4.3.0/index.html" data-version="4.3.0">4.3.0</option>
<option value="../../master/index.html" data-version="master">master</option>
</select>
</form>
<script>
$('option[data-version="'+window.projectVersion+'"]').prop('selected', true);
</script>
<form id="search-form" action="../search.html" method="GET">
<span class="glyphicon glyphicon-search"></span>
<input name="search"
class="typeahead form-control"
type="search"
placeholder="Search">
</form>
</div>
<div id="api-tree"></div>
</div>
<div id="right-column">
<nav id="site-nav" class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">elias-haeussler.de API</a>
</div>
<div class="collapse navbar-collapse" id="navbar-elements">
<ul class="nav navbar-nav">
<li><a href="../classes.html">Classes</a></li>
<li><a href="../namespaces.html">Namespaces</a></li>
<li><a href="../interfaces.html">Interfaces</a></li>
<li><a href="../traits.html">Traits</a></li>
<li><a href="../doc-index.html">Index</a></li>
<li><a href="../search.html">Search</a></li>
</ul>
</div>
</div>
</nav>
<div class="namespace-breadcrumbs">
<ol class="breadcrumb">
<li><span class="label label-default">Namespace</span></li>
<li><a href="../EliasHaeussler.html">EliasHaeussler</a></li><li class="backslash">\</li><li><a href="../EliasHaeussler/Api.html">Api</a></li><li class="backslash">\</li>
</ol>
</div>
<div id="page-content">
<div class="page-header">
<h1>EliasHaeussler\Api</h1>
</div>
<h2>Namespaces</h2>
<div class="namespace-list">
<a href="../EliasHaeussler/Api/Controller.html">EliasHaeussler\Api\Controller</a><a href="../EliasHaeussler/Api/Exception.html">EliasHaeussler\Api\Exception</a><a href="../EliasHaeussler/Api/Frontend.html">EliasHaeussler\Api\Frontend</a><a href="../EliasHaeussler/Api/Routing.html">EliasHaeussler\Api\Routing</a><a href="../EliasHaeussler/Api/Utility.html">EliasHaeussler\Api\Utility</a> </div>