{"id":19526332,"url":"https://github.com/phpfui/instadoc","last_synced_at":"2025-10-30T06:12:38.632Z","repository":{"id":57040481,"uuid":"230695842","full_name":"phpfui/InstaDoc","owner":"phpfui","description":"Instant PHP Documentation pages","archived":false,"fork":false,"pushed_at":"2024-12-27T16:16:51.000Z","size":375,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-28T00:04:53.421Z","etag":null,"topics":["docblock","php","phpdoc","phpdocumentor"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phpfui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-29T03:06:37.000Z","updated_at":"2024-12-27T16:16:55.000Z","dependencies_parsed_at":"2024-07-10T17:14:16.127Z","dependency_job_id":"cb784953-9e77-45e1-99de-48cef2a2f040","html_url":"https://github.com/phpfui/InstaDoc","commit_stats":null,"previous_names":[],"tags_count":73,"template":false,"template_full_name":null,"purl":"pkg:github/phpfui/InstaDoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpfui%2FInstaDoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpfui%2FInstaDoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpfui%2FInstaDoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpfui%2FInstaDoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpfui","download_url":"https://codeload.github.com/phpfui/InstaDoc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpfui%2FInstaDoc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262352619,"owners_count":23297689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docblock","php","phpdoc","phpdocumentor"],"created_at":"2024-11-11T01:09:33.546Z","updated_at":"2025-10-30T06:12:33.600Z","avatar_url":"https://github.com/phpfui.png","language":"PHP","readme":"# PHPFUI\\InstaDoc Library [![Tests](https://github.com/phpfui/InstaDoc/actions/workflows/tests.yml/badge.svg)](https://github.com/phpfui/InstaDoc/actions?query=workflow%3Atests) [![Latest Packagist release](https://img.shields.io/packagist/v/phpfui/InstaDoc.svg)](https://packagist.org/packages/phpfui/InstaDoc) ![](https://img.shields.io/badge/PHPStan-level%206-brightgreen.svg?style=flat)\n\n## A quick and easy way to add documentation to your PHP project\n\nWe all document our code with PHP [DocBlocks](https://en.wikipedia.org/wiki/PHPDoc) but we never seem to actually generate the documentation and add it to our project. Why? It simply takes too much time (over a minute), so we put it off till later, and later never comes.\n\nBut with PHPFUI/InstaDoc, you can document your site in about a minute (OK, maybe 2). The steps involved:\n * Install PHPFUI/InstaDoc via Composer (30 seconds)\n * Run installation script (30 seconds)\n * Create document page (1 minute, 6 lines of code)\n\n Two minutes to usable documentation with the following features:\n\n## PHPFUI/InstaDoc Features\n * Always up to date, even with code that is not yet checked in.\n * Send constructor information including parameters and default values to clipboard.\n * Child and Parent class hierarchy clearly displayed and accessable.\n * Quick access to highlighted PHP source with user selectable highlighting.\n * Quick access to the file's git history for the local repo.\n * Full support for @inheritDoc tag so child method docs are displayed correctly.\n * Documents all projects loaded via Composer automatically.\n * Tabbed documentation so you are not looking at irrelevant methods.\n * Alphabetized everything, no more searching unalphabetized pages!\n * Support for markdown and custom markdown pages.\n * Ability to generate static html files for high volume sites.\n * Add any local repo directories.\n * Remove any Composer project you don't care about.\n * 5+ line config compatible with all PHP frameworks, or standalone.\n * Uses [Foundation CSS framework](https://get.foundation) for a great experience on mobile.\n\n### Install PHPFUI/InstaDoc (requires PHP \u003e= 8.0)\n```\ncomposer require phpfui/InstaDoc\n```\n### Run Installation Script\nOnce installed, you need to run an installation script to copy static files to your public directory.  From your project root, run the following:\n```\nphp vendor/phpfui/instadoc/install.php yourPublicDirectory/subDirectory\n```\nExample: **php vendor/phpfui/instadoc/install.php public/PHPFUI** will add all needed files to public/PHPFUI, which will avoid any conflicts with your current files.  You can specify any directory by using \\PHPFUI\\Page::setResourcePath, but PHPFUI is recomended to keep things simple.\n\n### Create Document Page\nPHPFUI/InstaDoc does not reply on any framework and can run on a standalone page. It is recommended that you do not make your documentation public, as PHPFUI/InstaDoc will display PHP source files. How you restrict access to the page is up to you.  The following does not restrict access and is simply an example:\n\n```php\n\u003c?php\ninclude 'yourAutoLoader.php';\n\n// pass the directory containing your composer.json file\n$fileManager = new \\PHPFUI\\InstaDoc\\FileManager('../');\n\n// add your App class tree in, pass true as the last parameter if this namespace is in your local git repo.\n$fileManager-\u003eaddNamespace('App', '../App', true);\n\n// load your cached files\n$fileManager-\u003eload();\n\n// load child classes if you want to display them, if you don't do this step, docs will not show classes that extend the displayed class\n\\PHPFUI\\InstaDoc\\ChildClasses::load();\n\n// get the controller\n$controller = new \\PHPFUI\\InstaDoc\\Controller($fileManager);\n\n// display will return a fully formed page\necho $controller-\u003edisplay();\n```\nThat is it. You are done!\n\n### Adding New Classes\nPHPFUI/InstaDoc saves the classes to display in PHP serialized files.  Delete those files (.serial extension) when you want to display new classes. PHPFUI/InstaDoc will regenerate automatically if the files are missing.\n\n### Add Child Classes to the Docs\n```php\n\\PHPFUI\\InstaDoc\\ChildClasses::load('../ChildClasses.serial');\n```\n\n### Add a Global Namespace Class\nThe git repo path defaults to the composer directory, but you can change the path by calling:\n```php\n$fileManager-\u003eaddGlobalNameSpaceClass(__DIR__ . '/global/FPDF.php');\n```\n\n### Removing a Namespace\n```php\n$fileManager-\u003eexcludeNamespace('Carbon');\n```\n\n### Add git Repository Page\nThe git repo path defaults to the composer directory, but you can change the path by calling:\n```php\n$controller-\u003esetGitRoot(getcwd() . '/../');\n```\n\n### Add Documents To Your Docs Home Page\n```php\n$controller-\u003eaddHomePageMarkdown('../PHPFUI/InstaDoc/README.md');\n```\n\n### Set Your Home Page\nYou may want users to get back into your system easily. Clicking on the top left menu bar will take them here:\n```php\n$controller-\u003esetHomeUrl('/');\n```\n\n### Breakup Your Documentation Into Sections\nIf you have a lot of source code, you might want to break it into sections, so you will need a separate file to store the index in per section:\n```php\n$fileManager-\u003esetBaseFile('SubProject');\n```\n\n### Generate Static Files\nJust the doc and file pages, no git!\n```php\n$controller-\u003egenerate('static/file/path', [\\PHPFUI\\InstaDoc\\Controller::DOC_PAGE, \\PHPFUI\\InstaDoc\\Controller::FILE_PAGE, ]));\n```\n\n### Examples and Full Class Documentation\n\n[PHPFUI/InstaDoc](http://phpfui.com/?n=PHPFUI%5CInstaDoc)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpfui%2Finstadoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpfui%2Finstadoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpfui%2Finstadoc/lists"}