All Projects → AbcAeffchen → doxygen-php-filters

AbcAeffchen / doxygen-php-filters

Licence: GPL-2.0 license
Filters to get Doxygen work better with PHP code

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to doxygen-php-filters

liqe
Lightweight and performant Lucene-like parser, serializer and search engine.
Stars: ✭ 513 (+2750%)
Mutual labels:  filter
cargo-limit
Cargo with less noise: warnings are skipped until errors are fixed, Neovim integration, etc.
Stars: ✭ 105 (+483.33%)
Mutual labels:  filter
dissect-tester
Simple API/UI for testing filebeat dissect patterns against a collection of sample log lines.
Stars: ✭ 58 (+222.22%)
Mutual labels:  filter
sql-repository
[PHP 7] SQL Repository implementation
Stars: ✭ 37 (+105.56%)
Mutual labels:  filter
leaflet-tag-filter-button
Adds tag filter control for layers (marker, geojson features etc.) to LeafLet.
Stars: ✭ 48 (+166.67%)
Mutual labels:  filter
caddy-filter
Provides a directive to filter response bodies in caddy.
Stars: ✭ 36 (+100%)
Mutual labels:  filter
ionic-login-component
Free sample of Premium Ionic Login Component
Stars: ✭ 17 (-5.56%)
Mutual labels:  filter
Android-FilterView
Build a simple filter view with customizable controls.
Stars: ✭ 20 (+11.11%)
Mutual labels:  filter
Silverdog
An audio firewall for Chrome!
Stars: ✭ 65 (+261.11%)
Mutual labels:  filter
DrupalTwigFood
Useful functions, filters for twig @ Drupal 8
Stars: ✭ 1 (-94.44%)
Mutual labels:  filter
AdvancedHTMLParser
Fast Indexed python HTML parser which builds a DOM node tree, providing common getElementsBy* functions for scraping, testing, modification, and formatting. Also XPath.
Stars: ✭ 90 (+400%)
Mutual labels:  filter
pystockfilter
Financial technical and fundamental analysis indicator library for pystockdb.
Stars: ✭ 26 (+44.44%)
Mutual labels:  filter
openNES-Snake
Simple rebuilt of the classic Snake game for the NES in C using the cc65 cross compiler.
Stars: ✭ 18 (+0%)
Mutual labels:  doxygen
ASH-IR-Dataset
An impulse response dataset for binaural synthesis of spatial audio systems on headphones
Stars: ✭ 100 (+455.56%)
Mutual labels:  filter
spring-boot-jpa-rest-demo-filter-paging-sorting
Spring Boot Data JPA with Filter, Pagination and Sorting
Stars: ✭ 70 (+288.89%)
Mutual labels:  filter
regXwild
⏱ Superfast ^Advanced wildcards++? | Unique algorithms that was implemented on native unmanaged C++ but easily accessible in .NET via Conari (with caching of 0x29 opcodes +optimizations) etc.
Stars: ✭ 20 (+11.11%)
Mutual labels:  filter
TD-Flow-ABS
Real-time Flow-based Image and Video Abstraction in TouchDesigner.
Stars: ✭ 72 (+300%)
Mutual labels:  filter
laravel-survey
Laravel 6 survey app.
Stars: ✭ 39 (+116.67%)
Mutual labels:  doxygen
eclox
Eclox is a simple doxygen frontend plug-in for eclipse. It aims to provide a slim and sleek integration of the code documentation process into Eclipse.
Stars: ✭ 32 (+77.78%)
Mutual labels:  doxygen
DatatableJS
Jquery datatable with entity framework using MVC html helper
Stars: ✭ 25 (+38.89%)
Mutual labels:  filter

doxygen-php-filters

Gitter

Filters to get Doxygen (Doxygen on GitHub) work better with PHP code.

How to use

  1. Choose your filter and download the .php file. If you want to use more than one filter, you can combine them to one file or if you want to use all filters, you can use all_filters.php.
  2. Set the INPUT_FILTER to php filter_file_name.php.
    If PHP is not included in your PATH variable, you have to use /path/to/php filter_file_name.php instead.

The Filters

Short array syntax (attribute_short_array_syntax.php)

This filter adds support for the short array syntax introduced with PHP 5.4. If you have a multiline default value for a class member like this

private $arr = [ 0 => [ ... ],
                 2 => [ ... ] ];

doxygen only adds the first line to the documentation. The filter converts this code to

private $arr = array( 0 => [ ... ],
                      2 => [ ... ] );

so doxygen can understand the array syntax right.

Class member type hints (attribute_type_hints.php)

There seems to be a bug that prevents doxygen from documenting class members with @var. The filter is a slight improvement from this Stackoverflow answer by Goran Rakic.
Notice: The documentation string must not contain a slash (/).

Support for @return $this (method_return_this.php)

Sometimes you want to return $this, but then doxygen does not link the return type to the class. This filter fixes this by looking for the right class name $this belongs to and replaces $this by the class name.

Class method type hints (method_type_hints.php)

If you have some trouble with type hints of class methods, this filter could be helpful.

Support class_exists() checks (class_exists_support.php)

If you use if(!class_exists('className')){ ... } to prevent defining a class multiple times, doxygen could get confused. This filter removes the if-statement for doxygen.
Notice: If you must not define more than one class in a file that uses if(!class_exists()) and you have to use the string if(!class_exists( to get this filter work. The whole line, that contains this string gets removed.

Support/Workaround for traits (traits.php)

Since PHP does not support inheritance from multiple classes, you maybe want to use traits. But doxygen does not support this at all.

This filter converts a trait into a class and transforms all usages of a trait into an inheritance. So

class MyClass{
    use MyTrait1, MyTrait2;
    
    ...
}

becomes

class MyClass extends MyTrait, MyTrait2{
    ...
}

This is not valid PHP, but doxygen documents it as a multiple inheritance and you can see the methods of the traits in you class.

Notice: This filter doesn't support conflict resolution. So

class MyClass {
    use MyTrait1, MyTrait2 {
        MyTrait2::traitFunction1 insteadof MyTrait1;
        MyTrait1::traitFunction2 insteadof MyTrait2;
    }
}

will not work.

Support class attributes grouped by visibility (attribute_grouped_visibility.php)

This filter supports declarations like

class Foo
{
    private
        /// the blue color
        $blue,
        /// the red color
        $red;
        
    ...
}

by iteratively copying the keywords private, protected and public to the attributes.

Laravel Cron Documentation (laravel_cron.php)

Documentation like

/**
 * Docs
 */
\Cron::add('jobName', '* * * * *', function() 
{
    ...
});

gets lost because the documentation comment is not followed by a function declaration. It also not works if you move the documentation comment right in front of the function(), because doxygen is missing a function name. The filter is moving the documentation comment to the right place, removes the Cron::add(...,..., part and copies the name to the function() so it looks like this:

/**
 * Docs
 */
public function jobName() 
{
    ...
});

This also works if the documentation comment is already in the right place.

Since this filter is very special to some users of Laravel, it is not included in the all_filters file.

Credits

Thanks to Goran Rakic for providing the class member hint filter in this Stackoverflow answer. This gave me the first push to write more filters.
Thanks to Lorenz Meyer for improving the traits filter.
Thanks to madankundu for testing the laravel_cron filter.

License

Licensed under the GPL v2.0 License.

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].