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.
Add the BumbleDocGen to the composer.json
file of your project using the following command:
composer require bumble-tech/bumble-doc-gen
💡 Please refer to the Description of the technical part of the project for a detailed explanation of all the classes and methods used.
-
🔍 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.
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 theREADME.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 aDocGenerator
instance using provided configuration files.setCustomConfigurationParameters(customConfigurationParameters: array)
: This method sets custom configuration parameters for theDocGenerator
creation.
- 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();
- 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: Thu Oct 5 17:42:06 2023 +0300
Page content update date: Sun Oct 15 2023
Made with Bumble Documentation Generator