for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Doctrine\Tests\Models\CMS;
/**
* @Document
*/
class CmsArticle
{
/** @Id */
public $id;
/** @Field(type="string") */
public $topic;
public $text;
/** @ReferenceOne(targetDocument="CmsUser") */
public $user;
public $comments;
/** @Version */
public $version;
/** @Attachments */
public $attachments;
public function setAuthor(CmsUser $author) {
$this->user = $author;
}
public function addComment(CmsComment $comment) {
$this->comments[] = $comment;
$comment->setArticle($this);