你能提示PHP 5.2.5中的返回类型吗? [英] Can you hint return types in PHP 5.2.5?

查看:138
本文介绍了你能提示PHP 5.2.5中的返回类型吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为我的eclipse的ctrl +点击链接可能会受益匪浅...



编辑:我正在使用eclipse PDT。 p>

编辑2:我非常高兴在使用@return或@var语句的函数(和变量)之前放置docblock的解决方案我刚刚更新了我的应用程序的文档,现在eclipse显示了什么功能可用于什么对象!



令人敬畏。

解决方案

  // [...] 
/ **
*返回Request对象
*
* @return Zend_Controller_Request_Abstract
* /
public function getRequest()
{
return $ this-> _request;
}
// [...]

与Eclipse PDT完美配合。你使用哪个插件?


I think my eclipse's ctrl+clicking links might benefit greatly...

Edit: I'm using eclipse PDT.

Edit 2: I'm very happy with the solution of putting docblocks before functions (and variables) with an @return or @var statement, I've just updated the documentation of my app and now eclipse is showing me what functions are available to what objects!

Awesome.

解决方案

// [...]
/**
 * Return the Request object
 *
 * @return Zend_Controller_Request_Abstract
 */
public function getRequest()
{
    return $this->_request;
}
// [...]

works perfectly with Eclipse PDT. Which plugin do you use?

这篇关于你能提示PHP 5.2.5中的返回类型吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆