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中列为属性
没有找到相关结果
已邀请:
1 个回复
届甸衬丝蚕
这有几个原因。首先,文档块以
而不是
开头。同样,您将
声明为
的实例,但实际的类名是
。这不匹配,因此您将不会获得任何代码完成(或至少不会获得预期的代码完成)。 因此,您应该使用:
另外,如果要访问属性,则应声明它们。这是Netbeans知道属性的唯一方法。 我还没有测试过是否在文档块中为
指定一个类是否真正起作用。