*/ class Vote { /** * @var Article */ protected $article; /** * @var User */ protected $user; /** * @var string */ protected $value; /** * @param Article $article * @return */ public function setArticle($article) { $this->article = $article; if ($article) { $this->article->addVote($this); } return $this; } /** * @return Article $article */ public function getArticle() { return $this->article; } /** * @param User $user * @return */ public function setUser($user) { $this->user = $user; if ($user) { $this->user->addVote($this); } return $this; } /** * @return User $user */ public function getUser() { return $this->user; } /** * @param string $value * @return */ public function setValue($value) { $this->value = (string) $value; return $this; } /** * @return string $value */ public function getValue() { return $this->value; } }