NetBeans。代码完成。 PHP

| 我用这样的东西:
index.php(entryPoint)

<?php
include \'view.php\';
$view= new View;

$view->a=5;
$view->render(\'index.tpl\');
view.php
<?

clas View{    
   public function render($file){     
        include \'templates/\'.$file;
   }
}
templates/index.tpl


<?php /* @var $this View */?>
//some html
<?php $this->| ?> /*I want to see \"a\" incode completion here
                  How it is possible?
我知道ZendFramework插件允许这样的事情 也许我可以在我的框架中添加它?    一些其他的HTML * / UPD: 我想查看在
index.tpl
中的代码完成中在
index.php
中使用的属性 属性不应在ѭ5中列为属性     
已邀请:
这行不通:
<?php /* @var $this Viewer */?>
这有几个原因。首先,文档块以
/**
而不是
/*
开头。同样,您将
$this
声明为
Viewer
的实例,但实际的类名是
View
。这不匹配,因此您将不会获得任何代码完成(或至少不会获得预期的代码完成)。 因此,您应该使用:
<?php /** @var $this View */?>
另外,如果要访问属性,则应声明它们。这是Netbeans知道属性的唯一方法。 我还没有测试过是否在文档块中为
$this
指定一个类是否真正起作用。     

要回复问题请先登录注册