Download the PHP package berlioz/doc-parser without Composer

On this page you can find all versions of the php package berlioz/doc-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package doc-parser

Berlioz Doc Parser

Latest Version Software license Build Status Quality Grade Total Downloads

Berlioz Doc Parser is a PHP library to parse documentation and allow to integrate this on website for example.

Installation

Composer

You can install Berlioz Doc Parser with Composer, it's the recommended installation.

Dependencies

To parse files, you need additional package:

Usage

Library use league/flysystem library to manipulate files. This library permit to use some adapter like Local files, GitLab, Google... that's very useful for documentation source.

Documentation generation

You need to define the parser of you documentation, in the example: Berlioz\DocParser\Parser\Markdown.

Documentation files

You can access to documentation files easily:

And filter the files by type:

Two file type exists:

Documentation handle

When your documentation is generate, you can use Documentation::handle() method to get pages and files.

Treatments

A concept of treatment is implement to manipulate files after generation.

Some treatments are activate by default:

Optionals treatments are available:

You can also create your treatment class and add this to generator:

Formats

MarkDown

A specific tag is for indexation of documentation.

reStructuredText

A specific directive is for indexation of documentation.

...index:
    :title: Title of page
    :slug: Slug name (replace only the filename, not path)
    :breadcrumb: Category; Sub category; My page
    :summary-order: 1
    :summary-visible: true

Options available for indexation

You can define your own options, for your treatments for example, options are available with Page::getMeta(...) method.

Summary

Doc summary

Doc summary references all pages with a breadcrumb. It's a hierarchy of Berlioz\DocParser\Doc\Summary\Entry objects.

You can get path of entry with method Entry::getPath(), it's the absolute path from root directory of documentation.

Page summary

Page summary references all headings in the page content. It's a hierarchy of Berlioz\DocParser\Doc\Summary\Entry objects.

No path given to the entry, but an id Entry::getId() linked to the corresponding heading.

Parser

Two parser are available by default:

You can also create your own parser, you need only to implement Berlioz\DocParser\Parser\ParserInterface interface.

If you need to add an extension to a specific parser, a getter method is available to access to the original parser. Example for MarkDown parser: \Berlioz\DocParser\Parser\Markdown::getCommonMarkConverter().

You can also pass to the Markdown and reStructuredText constructors the same parameters that corresponding libraries.

Cache

Generation of documentation take time, and it's not acceptable to generate documentation at every request.

Berlioz\DocParser\DocCacheGenerator class generate a cache of generated and treated documentation to reuse it quickly. The cache use league/flysystem package to store cache files.

Example of usage:


All versions of doc-parser with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-mbstring Version *
berlioz/helpers Version ^1.5
berlioz/html-selector Version ^2.0
berlioz/http-message Version ^2.0
league/flysystem Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package berlioz/doc-parser contains the following files

Loading the files please wait ....