File tree Expand file tree Collapse file tree 4 files changed +27
-3
lines changed Expand file tree Collapse file tree 4 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 1+ Version 0.5.1
2+ -------------
3+
4+ * Fix building compatiblity with PHP 5.3.*
5+ thanks to grep-awesome@github
6+
17Version 0.5
28-----------
39
Original file line number Diff line number Diff line change 11<?php
22class PHPCtags
33{
4- const VERSION = '0.5 ' ;
4+ const VERSION = '0.5.1 ' ;
55
66 private $ mFile ;
77
Original file line number Diff line number Diff line change 44An enhanced php [ ctags] ( http://ctags.sourceforge.net/ ) index file generator
55compatible with http://ctags.sourceforge.net/FORMAT .
66
7- Using [ PHP_Parse ] ( https://github.com/nikic/PHP-Parser ) as PHP syntax parsing
7+ Using [ PHP_Parser ] ( https://github.com/nikic/PHP-Parser ) as PHP syntax parsing
88backend, written in pure PHP. The generated ctags index file contains scope
99and access information about class's methods and properties.
1010
Original file line number Diff line number Diff line change 22
33$ phar = new Phar ('build/phpctags.phar ' , 0 , 'phpctags.phar ' );
44
5+ if (version_compare (PHP_VERSION , '5.4.0 ' ) < 0 ) {
6+ class RecursiveCallbackFilterIterator extends RecursiveFilterIterator {
7+ public function __construct ( RecursiveIterator $ iterator , $ callback ) {
8+ $ this ->callback = $ callback ;
9+ parent ::__construct ($ iterator );
10+ }
11+
12+ public function accept () {
13+ $ callback = $ this ->callback ;
14+ return $ callback (parent ::current (), parent ::key (), parent ::getInnerIterator ());
15+ }
16+
17+ public function getChildren () {
18+ return new self ($ this ->getInnerIterator ()->getChildren (), $ this ->callback );
19+ }
20+ }
21+ }
22+
523$ phar ->buildFromIterator (
624 new RecursiveIteratorIterator (
725 new RecursiveCallbackFilterIterator (
@@ -22,7 +40,7 @@ function ($current) {
2240
2341 foreach ($ excludes as $ exclude ) {
2442 if (fnmatch (getcwd ().'/ ' .$ exclude , $ current ->getPathName ())) {
25- return false ;
43+ return false ;
2644 }
2745 }
2846
You can’t perform that action at this time.
0 commit comments