开发者

How to get code completion for variables into zend_view using netbeans 6.9.1?

i'm evaluating to switch to netbeans ide for managing my zend_framework project;

i'd like to have autocompletion for variable's 开发者_运维知识库name into my view, for variables defined in actions as i see in this screencast,

http://netbeans.org/kb/docs/php/zend-framework-screencast.html ,

but i can't figure out.

When i digit $this-> in any view i can't see none variable's name.

I'd like a lot to use this feature.

Thank you, Mirco.


You need to have Zend Framework either in the include path for the project within Netbeans or within the project itself.

You can then use cmd+space after a "->" to autocomplete an object's methods. If Netbeans doesn't know the object you can use /* @var $objInstance Object_Class_Name

Within a method call, you can use cmd+b to see the parameters of the method.


Here is a code example for the view using Robs solution.

<?php
/* @var $this Zend_View */
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Zend Framework Default Application</title>
    </head>
    <body>
        <?php echo $this->layout()->content; ?>
    </body>
</html>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜