shawncplus/phpcomplete.vim — pull request #21 by markwu (2013-05-15 11:26:13+00:00)
Title: Add Class::getClass() support

I just open this pull request for discussion.

Currently, my code use Class::getClass() to get singleton instance. But phpomplete.vim only support Class::getInstance(). Does there any way to add this kind of stuff through plugins or configurations, instead of hacking the core?

You can see I have to add the following code to do this:

" do in-file lookup for Class::getClass()
if line =~# '^\s*\$'.object.'\s*=&\?\s*\s\+\('.class_name_pattern.'\)::get\1'
let classname = matchlist(line, '\$'.object.'\s*=&\?\s*\s\+\('.class_name_pattern.'\)::get\1')[1]
return classname
endif

Any ideas or suggestions?