Skip to content

Commit

Permalink
Can use custom function to process function name
Browse files Browse the repository at this point in the history
Let the user to define a custom function to process the, getter and
setter, function name. If the custom function doesn't exist, it will
fall back to the normal flow.
  • Loading branch information
tandiljuan committed Feb 27, 2015
1 parent ea5dc91 commit 2eb41f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ftplugin/php_getset.vim
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,12 @@ if !exists("*s:ProcessVariable")
function s:ProcessVariable(variable)
let s:indent = substitute(a:variable, s:variable, '\1', '')
let s:varname = substitute(a:variable, s:variable, '\4', '')
let s:funcname = toupper(s:varname[0]) . strpart(s:varname, 1)

if exists("*PhpGetsetProcessFuncname")
let s:funcname = PhpGetsetProcessFuncname(s:varname)
else
let s:funcname = toupper(s:varname[0]) . strpart(s:varname, 1)
endif

" If any getter or setter already exists, then just return as there
" is nothing to be done. The assumption is that the user already
Expand Down

0 comments on commit 2eb41f3

Please sign in to comment.