<legend id='3uJDm'><style id='3uJDm'><dir id='3uJDm'><q id='3uJDm'></q></dir></style></legend>

    1. <small id='3uJDm'></small><noframes id='3uJDm'>

      • <bdo id='3uJDm'></bdo><ul id='3uJDm'></ul>
    2. <i id='3uJDm'><tr id='3uJDm'><dt id='3uJDm'><q id='3uJDm'><span id='3uJDm'><b id='3uJDm'><form id='3uJDm'><ins id='3uJDm'></ins><ul id='3uJDm'></ul><sub id='3uJDm'></sub></form><legend id='3uJDm'></legend><bdo id='3uJDm'><pre id='3uJDm'><center id='3uJDm'></center></pre></bdo></b><th id='3uJDm'></th></span></q></dt></tr></i><div id='3uJDm'><tfoot id='3uJDm'></tfoot><dl id='3uJDm'><fieldset id='3uJDm'></fieldset></dl></div>
      <tfoot id='3uJDm'></tfoot>

      自动完成带有 PDT/Netbeans 类的 PHP 对象?

      时间:2023-09-20
      <tfoot id='sPWfD'></tfoot>
    3. <small id='sPWfD'></small><noframes id='sPWfD'>

              • <bdo id='sPWfD'></bdo><ul id='sPWfD'></ul>
                <legend id='sPWfD'><style id='sPWfD'><dir id='sPWfD'><q id='sPWfD'></q></dir></style></legend>
                  <tbody id='sPWfD'></tbody>
                <i id='sPWfD'><tr id='sPWfD'><dt id='sPWfD'><q id='sPWfD'><span id='sPWfD'><b id='sPWfD'><form id='sPWfD'><ins id='sPWfD'></ins><ul id='sPWfD'></ul><sub id='sPWfD'></sub></form><legend id='sPWfD'></legend><bdo id='sPWfD'><pre id='sPWfD'><center id='sPWfD'></center></pre></bdo></b><th id='sPWfD'></th></span></q></dt></tr></i><div id='sPWfD'><tfoot id='sPWfD'></tfoot><dl id='sPWfD'><fieldset id='sPWfD'></fieldset></dl></div>

              • 本文介绍了自动完成带有 PDT/Netbeans 类的 PHP 对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                当我像这样使用 new 定义一个类的对象时

                When I define an object of a class using new like this

                $blah = new Whatever();
                

                我得到了 $blah 的自动完成.但是当我将 $blah 作为函数参数时我该怎么做?如果没有自动完成,我是不完整的.

                I get autocomplete for $blah. But how do I do it when I have $blah as a function parameter? Without autocomplete I am incomplete.

                编辑:如果它在包含中并且 PDT 或 Netbeans 无法弄清楚,我该怎么做? 有没有办法在其中声明变量的类型PHP?

                Edit: How do I do it if it's in an include and PDT or Netbeans can't figure it out? Is there any way to declare types for variables in PHP?

                推荐答案

                第一个注释中的方法称为类型提示",但您应该明智地使用它.更好的解决方案是 phpDoc.

                Method in first comment is called "type hinting", but you should use that wisely. Better solution is phpDoc.

                /**
                 * Some description of function behaviour.
                 *
                 * @param Whatever $blah
                 */
                public function myFunction($blah)
                {
                    $blah-> 
                    // Now $blah is Whatever object, autocompletion will work.
                }
                

                您也可以使用内联的 phpDoc 注释,它的作用完全相同.

                You can also use an inline phpDoc comment which does exactly the same thing.

                public function myFunction($blah)
                {
                    /* @var $blah Whatever  */
                    $blah-> 
                    // Now $blah is Whatever object, autocompletion will work.
                }
                

                这篇关于自动完成带有 PDT/Netbeans 类的 PHP 对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:Netbeans + Xdebug + php 不工作 下一篇:如何在没有自动 DocBlock 格式的情况下在 NetBeans

                相关文章

                最新文章

              • <i id='jOzbJ'><tr id='jOzbJ'><dt id='jOzbJ'><q id='jOzbJ'><span id='jOzbJ'><b id='jOzbJ'><form id='jOzbJ'><ins id='jOzbJ'></ins><ul id='jOzbJ'></ul><sub id='jOzbJ'></sub></form><legend id='jOzbJ'></legend><bdo id='jOzbJ'><pre id='jOzbJ'><center id='jOzbJ'></center></pre></bdo></b><th id='jOzbJ'></th></span></q></dt></tr></i><div id='jOzbJ'><tfoot id='jOzbJ'></tfoot><dl id='jOzbJ'><fieldset id='jOzbJ'></fieldset></dl></div>
              • <tfoot id='jOzbJ'></tfoot>

                    <small id='jOzbJ'></small><noframes id='jOzbJ'>

                      <bdo id='jOzbJ'></bdo><ul id='jOzbJ'></ul>
                  1. <legend id='jOzbJ'><style id='jOzbJ'><dir id='jOzbJ'><q id='jOzbJ'></q></dir></style></legend>