GraphAware\Neo4j\OGM\Tests\Integration\UseCase\SimpleBlog\Model\SimpleBlogPost::setPublication PHP Method

setPublication() public method

public setPublication ( SimpleBlogWrote $blogWrote )
$blogWrote SimpleBlogWrote
    public function setPublication(SimpleBlogWrote $blogWrote)
    {
        $this->publication = $blogWrote;
    }

Usage Example

 public function createPost($title)
 {
     $post = new SimpleBlogPost($title);
     $wroteRel = new SimpleBlogWrote($this, $post);
     $this->posts->add($wroteRel);
     $post->setPublication($wroteRel);
 }