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

北战南征 提交于 2019-12-04 18:10:42

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>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!