Somewhat Advanced SuperAbbrevs
Submitted by Tuesday, 4 November, 2008 - 22:10
on
Hello,
Is there any chance of getting SupperAbrrevs to process variable twice?
I'm trying to do something like that, but it doesn’t work:
${1:public}
<# if ("$1" == "private") { #>
<#= "_" #>
<# } #>
If user enters "private" it should write underscore.
Another problem is processing entered variables like this:
/**
* Setter for property '${1:property}'
*
* @access ${2:public}
* @name set<# fu = "$1"; fu = fu.toUpperCase(); #><#= fu #>
* @param ${3:string} \$$1 $4
* @return ${5:null}
*/
$2 function set${1=firstUp(s)}(\$$1) {
\$this->${6:_}$1 = \$$1;
}
$end
It returns setter in PHP like this:
/**
* Setter for property 'property'
*
* @access public
* @name setproperty
* @param string $property
* @return null
*/
public function setProperty($property) {
$this->_property = $property;
}
But I want to have camelCase setProperty
after @name
How to achieve that?
--
regards,
takeshin