All Projects → phpDocumentor → Reflectiondocblock

phpDocumentor / Reflectiondocblock

Licence: mit
No description or website provided.

Programming Languages

PHP
23972 projects - #3 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to Reflectiondocblock

Phpdocumentor
Documentation Generator for PHP
Stars: ✭ 3,341 (-62.5%)
Mutual labels:  hacktoberfest, docblocks
Captain Fact Frontend
🔎 CaptainFact - Frontend. The one you see on https://captainfact.io
Stars: ✭ 74 (-99.17%)
Mutual labels:  hacktoberfest
Dotenv Java
🗝️ Dotenv is a no-dep, pure Java module that loads environment variables from a .env file
Stars: ✭ 72 (-99.19%)
Mutual labels:  hacktoberfest
Cstate
🔥 Open source static (serverless) status page. Uses hyperfast Go & Hugo, minimal HTML/CSS/JS, customizable, outstanding browser support (IE8+), preloaded CMS, read-only API, badges & more.
Stars: ✭ 1,186 (-86.69%)
Mutual labels:  hacktoberfest
Hacktoberfest Swag List
Multiple companies give out swag for Hacktoberfest, and this repo tries to list them all.
Stars: ✭ 1,184 (-86.71%)
Mutual labels:  hacktoberfest
Lms
LMS allows teachers and educators to easily provide feedback on student programming work - both manually and automatically.
Stars: ✭ 74 (-99.17%)
Mutual labels:  hacktoberfest
Tsuru Client
tsuru-client is a tsuru command line tool for application developers.
Stars: ✭ 72 (-99.19%)
Mutual labels:  hacktoberfest
Tealdeer
A very fast implementation of tldr in Rust.
Stars: ✭ 1,189 (-86.66%)
Mutual labels:  hacktoberfest
Masc
A Web Malware Scanner
Stars: ✭ 74 (-99.17%)
Mutual labels:  hacktoberfest
Ssh known hosts
Development repository for Chef Cookbook ssh_known_hosts
Stars: ✭ 73 (-99.18%)
Mutual labels:  hacktoberfest
Flatdict
Python module for interacting with nested dicts as a single level dict with delimited keys.
Stars: ✭ 73 (-99.18%)
Mutual labels:  hacktoberfest
Gr Nrsc5
A GNU Radio implementation of HD Radio (NRSC-5)
Stars: ✭ 73 (-99.18%)
Mutual labels:  hacktoberfest
Scidart
Multiplatform scientific computing for Dart
Stars: ✭ 73 (-99.18%)
Mutual labels:  hacktoberfest
Emayili
An R package for sending email messages.
Stars: ✭ 72 (-99.19%)
Mutual labels:  hacktoberfest
Openjdk Tests
Home of test infrastructure for AdoptOpenJDK builds
Stars: ✭ 73 (-99.18%)
Mutual labels:  hacktoberfest
Pagination
Paginate record sets, not tied in directly to a database.
Stars: ✭ 72 (-99.19%)
Mutual labels:  hacktoberfest
Choco Wiki
The content from this repository has been moved to https://github.com/chocolatey/docs. If you have found an issue, or want to submit a fix, then please open an issue, or a PR, on that repository.
Stars: ✭ 73 (-99.18%)
Mutual labels:  hacktoberfest
Catalogscanner
Scans Animal Crossing: New Horizon catalog from video of user scrolling through.
Stars: ✭ 74 (-99.17%)
Mutual labels:  hacktoberfest
Navi
An interactive cheatsheet tool for the command-line
Stars: ✭ 10,055 (+12.85%)
Mutual labels:  hacktoberfest
Remove W3schools
Chrome extension to remove W3Schools results in google searches.
Stars: ✭ 73 (-99.18%)
Mutual labels:  hacktoberfest

License: MIT Qa workflow Coveralls Coverage Scrutinizer Code Coverage Scrutinizer Code Quality Stable Version Unstable Version

ReflectionDocBlock

Introduction

The ReflectionDocBlock component of phpDocumentor provides a DocBlock parser that is 100% compatible with the PHPDoc standard.

With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.

Installation

composer require phpdocumentor/reflection-docblock

Usage

In order to parse the DocBlock one needs a DocBlockFactory that can be instantiated using its createInstance factory method like this:

$factory  = \phpDocumentor\Reflection\DocBlockFactory::createInstance();

Then we can use the create method of the factory to interpret the DocBlock. Please note that it is also possible to provide a class that has the getDocComment() method, such as an object of type ReflectionClass, the create method will read that if it exists.

$docComment = <<<DOCCOMMENT
/**
 * This is an example of a summary.
 *
 * This is a Description. A Summary and Description are separated by either
 * two subsequent newlines (thus a whiteline in between as can be seen in this
 * example), or when the Summary ends with a dot (`.`) and some form of
 * whitespace.
 */
DOCCOMMENT;

$docblock = $factory->create($docComment);

The create method will yield an object of type \phpDocumentor\Reflection\DocBlock whose methods can be queried:

// Contains the summary for this DocBlock
$summary = $docblock->getSummary();

// Contains \phpDocumentor\Reflection\DocBlock\Description object
$description = $docblock->getDescription();

// You can either cast it to string
$description = (string) $docblock->getDescription();

// Or use the render method to get a string representation of the Description.
$description = $docblock->getDescription()->render();

For more examples it would be best to review the scripts in the /examples folder.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].