The API Manual is a documentation of all PHP classes, functions, namespaces, etc. provided by WIKINDX. It is useful for core and component developers.
This API Manual is made with a PHP wrapper script release/cli-make-api-manual.php
on top of phpDocumentor 3.4.3 static generator (fixed version). The theme is the default.
As phpDocumentor is written in PHP and is OS independent, a version is stored in SVN at tools/phpDocumentor.phar
. It requires PHP 8.1.2 or higher. Others files tools/phpDocumentor.phar.asc
and tools/phpDocumentor.phar.pubkey
are needed by phpDocumentor to run.
To learn how to write PHP documentation, read the online documentation for phpDocumentor.
To generate the API Manual, run this command from the cli when your are in the SVN root directory:
php release/cli-make-api-manual.php
The code is generated in two folders :
build/trunk/website/api-manual/trunk
: a version for the trunk (will give https://wikindx.sourceforge.io/api-manual/trunk).build/X.Y.Z/website/api-manual/X.Y.Z
: a version for the the current release where X.Y.Z is equal to the value of WIKINDX_PUBLIC_VERSION taken from src/core/startup/CONSTANTS.php
(will give https://wikindx.sourceforge.io/api-manual/X.Y.Z).For updating the API Manual, generate the code and upload the content of each output folder inside the /home/project-web/wikindx/htdocs/api-manual
folder of the SourceForge website FTP. Don’t remove the folders of old versions from the FTP.
Regenerating an older version is not supported. To do this, you have to extract an old revision from SVN because the wrapper script uses the code of the current WIKINDX core and is not able to extract itself the code of the SVN, etc. It’s just an ad hoc script that could change from version to version.
For the online website to be complete you also need to generate and upload the website for the same versions. See its own page.
The configuration file is src/phpdoc.xml
. It is used to define the root folder of WIKINDX sources and ignored source files. Basically, the sources of cli tools, third party libraries and components are ignored. Files and directories containing non PHP files are also ignored as possible.
The build script injects some JS and HTML code inside all pages of the manual to create a dynamic version selector displayed at the top. The PHP file website/api-manual/version-switch.php
, stored at https://wikindx.sourceforge.io/web/version-switch.php
, provides a live list in JSON format of all version of the API Manual installed on SF. The JS script included in the API Manual uses this list of versions to allow a visitor to switch the current version instantly, without rebuilding old versions.