Skip to content

Latest commit

 

History

History
98 lines (60 loc) · 3.97 KB

README.md

File metadata and controls

98 lines (60 loc) · 3.97 KB

BumbleDocGen: A Documentation Generator for PHP projects 🐝

BumbleDocGen is a robust library for generating and maintaining documentation next to the code of large and small PHP projects.

This tool analyzes your codebase and produces a comprehensive set of Markdown documents, including descriptions of classes, methods, and properties alongside navigable internal links.

Installation

Add the BumbleDocGen to the composer.json file of your project using the following command:

 composer require bumble-tech/bumble-doc-gen

Detailed technical description

💡 Please refer to the Description of the technical part of the project for a detailed explanation of all the classes and methods used.

Core Features

  • 🔍 Parsing: BumbleDocGen scans your project by parsing PHP files, extracting comments, and providing detailed models of your code.

  • ✍️ Rendering: BumbleDocGen generates markdown content using templates and fills them with data obtained from parsing your code.

  • 🧠 AI tools for documentation generation: BumbleDocGen allows you to use a group of AI tools to help generate project documentation.

How to Use

Entry points

BumbleDocGen's interface consists of mainly two classes: DocGenerator and DocGeneratorFactory.

  • DocGenerator provides main operations for generating the documents.

    • addMissingDocBlocks(): This method creates missing docBlocks in your code.
    • fillInReadmeMdTemplate(): This method prepares the README.md file using a predefined template.
    • generate(): This method produces all necessary documentation.
    • generateProjectTemplatesStructure(): This method creates a structure for project templates.
    • parseAndGetRootEntityCollectionsGroup(): This method parses your project's files and collects information for the documentation.
  • DocGeneratorFactory provides a method for creating DocGenerator instance.

    • create(configurationFiles: string): This method creates a DocGenerator instance using provided configuration files.
    • setCustomConfigurationParameters(customConfigurationParameters: array): This method sets custom configuration parameters for the DocGenerator creation.

Examples of usage

  1. Working with a library in a PHP file
require_once 'vendor/autoload.php';

use BumbleDocGen\DocGeneratorFactory;

// Initialize the factory
$factory = new DocGeneratorFactory();

// Create a DocGenerator instance
$docgen = $factory->create('/path/to/configuration/files');

// or $docgen = $factory->createByConfigArray([...]);

// Now call the desired operation
$docgen->generate();
  1. Working with the library through a console application
# List of available commands
./vendor/bin/bumbleDocGen list

# Documentation generation example
./vendor/bin/bumbleDocGen generate -c <path to config file>

# Getting detailed information about a command
./vendor/bin/bumbleDocGen generate -h

This documentation was generated using the Bumble Documentation Generator, and is an example of how it works.

To update this documentation, run the following command:

 ./bin/bumbleDocGen generate

Last page committer: fshcherbanich <[email protected]>
Last modified date: Sat Oct 28 11:03:31 2023 +0300
Page content update date: Mon Nov 06 2023
Made with Bumble Documentation Generator