Symfony 这些注释是做什么用的@实体注释中的参数、@return、@var和set

Symfony 这些注释是做什么用的@实体注释中的参数、@return、@var和set,symfony,annotations,entity,Symfony,Annotations,Entity,我想了解我在一些代码中看到的以下注释。他们的目的是什么。我确实理解@Assert和@ORM,但不理解我在标题中提到的其他内容 这里是我看到的代码示例 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 t

我想了解我在一些代码中看到的以下注释。他们的目的是什么。我确实理解@Assert和@ORM,但不理解我在标题中提到的其他内容

这里是我看到的代码示例

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;
   }
}

我到处都读过,它只用于文档编制。符合事实的或者像@ORM和@Assert一样,它们在应用程序的构建中起着关键作用。

这仅用于文档编制目的:

像这样的工具将根据这些评论生成文档 IDE中的代码完成工具将基于这些注释,以了解给定方法期望的参数、返回的参数等。 检查所有这些文档注释的列表