Download the PHP package winter/wn-docs-plugin without Composer

On this page you can find all versions of the php package winter/wn-docs-plugin. 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 wn-docs-plugin

Docs Plugin

GitHub Workflow Status (branch) Codecov Discord

Integrates a full suite of documentation direct into your Winter CMS installation. Documentation can be generated from Markdown files or analysed from PHP code.

Features

Getting started

To install the plugin, you may install it through the Winter CMS Marketplace, or you may install it using Composer:

Then, run the migrations to ensure the plugin is enabled:

Registering documentation

Documentation can be registered by adding a registerDocumentation method to your Plugin class (Plugin.php), and will depend on whether the documentation is content-based or API-based, and whether the documentation or code is stored locally or remotely.

The method should return an array, with the key of each item representing the "code" of the documentation, and the following parameters in an array as the value:

Parameter Required Description
name Yes The name of this documentation. This will be displayed in documentation lists.
type Yes The type of documentation. It must be one of the following: md or php. See the Types of Documentation for more information.
source Yes Where the documentation can be sourced from. Must be either local or remote. See the Documentation Sources section for more information.
path No This will determine the path - relative to the plugin root if source is local or relative to the extracted content if remote - that the documentation or code can be found.
url No If source is remote, this will determine the URL to download the documentation source from. The URL must point to a ZIP file that can be extracted. Not needed if the source is local.
zipFolder No If source is remote, this will allow you to limit the source to a folder within the ZIP file, if the ZIP includes other files. You may also specify true to extract a single folder, if the folder name may be autogenerated. Ignored if the source is local.
token No If the source is remote, and is a private resource, you can add an authorization token to be sent with the HTTP request. Ignored if the source is local.
tocPath No Determines the path, relative to the source, where the table of contents YAML file can be found. By default, the Docs plugin will look for a toc.yaml in the root folder of the documentation source.
image No Provides an image representation of the documentation.
ignorePaths No An array of paths to ignore when finding available documentation. Each path may be specified as a glob.
repository No An array that contains the URL to the source repository, which allows the documentation to link back to the source, for example, to provide "Edit this page" links. You can specify both a url value, which represents the readable source location for both md and php type documentation, and an editUrl which represents the URL to edit the source of an md type documentation.

For API documentation (ie. the type parameter is php), there are a couple of extra parameters that may be specified:

Parameter Description
sourcePaths An array of paths to limit the API parser to. Each path may be specified as a glob. If no source paths are provided, all PHP files are parsed. Note that the ignorePaths patterns are still applied.

Types of Documentation

The Docs plugin currently supports two types of documentation, Markdown (md) and PHP (php).

Markdown

Markdown is used for the generation of textual and image-based documentation, allowing for the easy writing of large amounts of documentation in a short amount of time. The Markdown documentation processor uses the CommonMark library to ensure accurate parsing of Markdown and the enabling of these useful features:

Markdown documentation can be arranged in any way you see fit - the main table of contents can be specific in a .yaml file available within the documentation source.

Example table of contents YAML file

Example Markdown document

PHP

PHP documentation involves parsing a PHP source code directory and determining the available API within all the source code objects, such as classes, namespaces, properties and methods.

Using the awesome PHP Parser library, the code is analyzed and derived from the signatures of all aspects of a class, as well as doc-blocks written to provide additional context for those signatures.

This allows, for example, the following class:

To be rendered into a readable documentation that outlines the available properties ($title, $content) and method (render()) as readable documentation.


All versions of wn-docs-plugin with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.9
composer/installers Version ~1.0
nikic/php-parser Version ^4.11.0
phpdocumentor/reflection-docblock Version ^5.2.2
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 winter/wn-docs-plugin contains the following files

Loading the files please wait ....