【发布时间】:2014-09-19 14:59:02
【问题描述】:
我想了解我在某些代码中看到的以下注释。他们的目的是什么。 (我确实了解@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 在构建应用程序中起关键作用。
【问题讨论】:
标签: symfony annotations entity