/** * Add a tag to a photo. * * @param \Photo\Model\Tag $tag */ public function addTag($tag) { $tag->setPhoto($this); $this->tags[] = $tag; }