第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

PhpStorm - 如何在文件模板中轉(zhuǎn)義美元符號(php 變量)?

PhpStorm - 如何在文件模板中轉(zhuǎn)義美元符號(php 變量)?

PHP
森林海 2022-12-11 16:22:01
我在Editor > File and Code Templates下有一個 PhpStorm Php 文件模板:根據(jù)鏈接的 Apache Velocity Docs轉(zhuǎn)義美元符號,應(yīng)使用反斜杠:<?phpdeclare(strict_types=1);#parse("PHP File Header.php")#if (${NAMESPACE})namespace ${NAMESPACE};#enduse Symfony\Component\Form\DataTransformerInterface;use Symfony\Component\Form\Exception\TransformationFailedException;class ${NAME} implements DataTransformerInterface{    public function __construct()    {}    public function transform(\$value)    {        return ;    }}但是當(dāng)我在創(chuàng)建類時選擇模板時,反斜杠保持不變:文件輸出:<?phpdeclare(strict_types=1);namespace SomeProject\SomeBundle\Form\DataTransformer;use Symfony\Component\Form\DataTransformerInterface;use Symfony\Component\Form\Exception\TransformationFailedException;class TestTransformer implements DataTransformerInterface{    public function __construct()    {}    public function transform(\$value)    {        return ;    }    public function reverseTransform()    {        return ;    }}當(dāng)我直接選擇模板而不是創(chuàng)建類時它會起作用,但是名稱空間不會自動獲取...那么我該如何正確地轉(zhuǎn)義美元符號呢?那是一個已知的錯誤嗎?
查看完整描述

1 回答

?
藍山帝景

TA貢獻1843條經(jīng)驗 獲得超7個贊

${DS}根據(jù) PhpStorm 幫助頁面(下面的鏈接),如果您需要$在文件模板輸出中包含(美元符號),最好的方法是使用預(yù)定義變量。

https://www.jetbrains.com/help/phpstorm/file-template-variables.html


查看完整回答
反對 回復(fù) 2022-12-11
  • 1 回答
  • 0 關(guān)注
  • 162 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號