Download the PHP package unionofrad/li3_docs without Composer
On this page you can find all versions of the php package unionofrad/li3_docs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download unionofrad/li3_docs
More information about unionofrad/li3_docs
Files in unionofrad/li3_docs
Package li3_docs
Short Description An API and wiki-like documentation generator.
License BSD-3-clause
Homepage http://li3.me
Informations about the package li3_docs
li₃ docs
Once installed in your existing application, however, it generates documentation from your app's docblocks in real-time, which is all accessible from http://yourapp.tld/docs/. Not only that, but it will generate documentation for your plugins, too. Including itself; so it is self-replicating in a way. In this vein, it becomes part of a series of plugins required in order to obtain various documentation volumes of interest.
Such as:
So the documentation plugin is a tool for creating automatically browse-able documentation of your application's codebase. In addition to simple descriptions and tables of contents,
Note: li3_docs
is a plugin, NOT an app. Furthermore, by itself it is a VIEWER ONLY and
contains no actual documentation other than its own.
Installation
- To install run
composer require unionofrad/li3_docs
. - The plugin needs a configured
default
connection. - 2 tables need to be created using
schema.sql
file.
Documentation structure
For generating documentation, li3_docs relies on PHP documentation blocks, or docblocks.
These docblocks can appear above classes, methods, properties, etc., and contain three
things: a short description, a longer description (often including usage examples), and
docblock tags, which are denoted by an @
symbol, followed by a keyword. A typical
docblock might look something like this:
This docblock documents a class property, and contains a short description and two
docblock tags. The tags to be used in a docblock vary by what is being documented. A
property docblock should contain a @var
tag that describes what type of value the
property holds, while methods have a series of @param
tags and a @return
tag.
There are also general tags which can be added to any docblock. These include the @see
tag, which allows you to link to another class, method or property, and the @link
tag,
which allows you to link to an arbitrary URL.
Markdown syntax
Docblock descriptions are written in Markdown format, with a few conventions. Namely, any
code references or identifiers should be enclosed in backticks. This includes namespaces,
classes, variable names, and keywords like true
, false
and null
. Extended code
examples should be written enclosed in three sets of backticks, i.e.: ‍
// Code
goes here
use li3_docs\models\Indexes;
Indexes::register([ 'type' => 'book', 'title' => 'li₃: The Definitive Guide', 'name' => 'manual', 'version' => '1.x', 'path' => '/tmp/manual_1', ]);
Indexes::register([ 'type' => 'api', 'title' => 'Framework API', 'name' => 'lithium', 'version' => '1.0.x', 'path' => '/tmp/lithium_10', 'namespace' => 'lithium' ]);
li3 docs index
use li3_docs\models\Symbols;
foreach (Symbols::harvest($index) as $symbol) { ElasticSearch::addToIndex($symbol->data()); }
All versions of li3_docs with dependencies
nikic/php-parser Version 2.1.*
composer/installers Version 1.*
cebe/markdown Version 1.*
symfony/yaml Version 3.1.*
unionofrad/lithium Version >=1.1.0