我有一个带变量的代码模板,我想只在某些情况下将这个变量的值大写(只是第一个字母).有没有办法做到这一点?
模板代码如下 - 我想在我的函数名中大写Property Name ...
private $$${PropertyName};
${cursor}
public function get${PropertyName}()
{
return $$this->${PropertyName};
}
public function set${PropertyName}($$value)
{
$$this->${PropertyName} = $$value;
}
Run Code Online (Sandbox Code Playgroud)
请注意:这是一个模板,用于IDE中的代码模板(不是PHP).有关详细信息,请参阅:http://www.ibm.com/developerworks/opensource/tutorials/os-eclipse-code-templates/index.html
eclipse ×1