Merge "Added line to rel notes about CacheHelper class"
[lhc/web/wiklou.git] / maintenance / mwdoc-filter.php
1 <?php
2 # Original source code by Goran Rakic
3 # http://blog.goranrakic.com/
4 # http://stackoverflow.com/questions/4325224
5
6 # Should be filled in doxygen INPUT_FILTER as "php mwdoc-filter.php"
7
8 $source = file_get_contents( $argv[1] );
9 $regexp = '#\@var\s+([^\s]+)([^/]+)/\s+(var|public|protected|private)\s+(\$[^\s;=]+)#';
10 $replac = '${2} */ ${3} ${1} ${4}';
11 $source = preg_replace($regexp, $replac, $source);
12
13 echo $source;