[英]What are those annotation for? @param, @return, @var, and set in annotation of Entity
I would like to understand the following annotation that I see in some codes. 我想了解一些代码中的以下注释。 What is their purpose. 他们的目的是什么。 (I do understand @Assert and @ORM but not the others which I mentioned in my Title) (我确实了解@Assert和@ORM,但不了解我在标题中提到的其他对象)
here an exemple of code where I saw it. 这是我看到的一个示例代码。
class Image
{
/**
* Set url // is this line used by any code? Doctrine?
* @param string $url // is this line used by any code? Doctrine?
* @return Image // is this line used by any code? Doctrine?
*/
public function setUrl($url){
$this->url=$url;
return $this;
}
}
Have read here and there that it s only used for Documentation only. 在这里和那里已经阅读过,它仅用于文档。 True? 真正? or is it like @ORM and @Assert which have a key role in the building of an Application. 还是@ORM和@Assert,它们在构建应用程序中起着关键作用。
This is used only for documentation purposes: 这仅用于文档目的:
Check wiki for list of all these doc annotations 检查Wiki以获取所有这些文档注释的列表
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.