首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何用phpDocumentor在PHP5中记录类属性

如何用phpDocumentor在PHP5中记录类属性
EN

Stack Overflow用户
提问于 2010-02-04 03:28:40
回答 1查看 28.3K关注 0票数 32

考虑以下PHP 5类:

代码语言:javascript
复制
class SomeClass
{
    //I want to document this property...
    private $foo;


    function __construct()
    {

    }

    public function SetFoo($value)
    {
        $this->foo = $value;
    }

    public function GetFoo()
    {
        return $this->foo;
    }
}

如何在phpDocumentor中记录$foo属性?我甚至不确定它是否需要记录下来,但我想知道如果需要的话……

我知道如何记录SetFoo()和GetFoo(),只是对私有属性(变量?)不太确定。

谢谢!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-02-04 03:31:40

代码语言:javascript
复制
/**
 * This is what the variable does. The var line contains the type stored in this variable.
 * @var string
 */
private $foo;
票数 48
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2194822

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档