diff --git a/lib/Doctrine/Entities/AggregateToken.php b/lib/Doctrine/Entities/AggregateToken.php new file mode 100644 index 0000000000..85f9493da0 --- /dev/null +++ b/lib/Doctrine/Entities/AggregateToken.php @@ -0,0 +1,83 @@ +id; + } + + /** + * Set usr_id + * + * @param integer $usrId + * @return AggregateToken + */ + public function setUsrId($usrId) + { + $this->usr_id = $usrId; + + return $this; + } + + /** + * Get usr_id + * + * @return integer + */ + public function getUsrId() + { + return $this->usr_id; + } + + /** + * Set value + * + * @param string $value + * @return AggregateToken + */ + public function setValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * Get value + * + * @return string + */ + public function getValue() + { + return $this->value; + } +} \ No newline at end of file diff --git a/lib/Doctrine/Entities/FeedToken.php b/lib/Doctrine/Entities/FeedToken.php new file mode 100644 index 0000000000..9b1f35c72e --- /dev/null +++ b/lib/Doctrine/Entities/FeedToken.php @@ -0,0 +1,108 @@ +id; + } + + /** + * Set usr_id + * + * @param integer $usrId + * @return FeedToken + */ + public function setUsrId($usrId) + { + $this->usr_id = $usrId; + + return $this; + } + + /** + * Get usr_id + * + * @return integer + */ + public function getUsrId() + { + return $this->usr_id; + } + + /** + * Set feed + * + * @param \Entities\Feed $feed + * @return FeedToken + */ + public function setFeed(\Entities\Feed $feed = null) + { + $this->feed = $feed; + + return $this; + } + + /** + * Get feed + * + * @return \Entities\Feed + */ + public function getFeed() + { + return $this->feed; + } + /** + * @var string + */ + private $value; + + + /** + * Set value + * + * @param string $value + * @return FeedToken + */ + public function setValue($value) + { + $this->value = $value; + + return $this; + } + + /** + * Get value + * + * @return string + */ + public function getValue() + { + return $this->value; + } +} \ No newline at end of file diff --git a/lib/Doctrine/Repositories/AggregateTokenRepository.php b/lib/Doctrine/Repositories/AggregateTokenRepository.php new file mode 100644 index 0000000000..a12579fabc --- /dev/null +++ b/lib/Doctrine/Repositories/AggregateTokenRepository.php @@ -0,0 +1,29 @@ +_em->createQuery($dql); + $query->setParameters(array( + ':usr_id' => $user->get_id()) + ); + + return $query->getOneOrNullResult(); + } +} diff --git a/lib/Doctrine/Repositories/FeedTokenRepository.php b/lib/Doctrine/Repositories/FeedTokenRepository.php new file mode 100644 index 0000000000..c592dd4611 --- /dev/null +++ b/lib/Doctrine/Repositories/FeedTokenRepository.php @@ -0,0 +1,31 @@ +_em->createQuery($dql); + $query->setParameters(array( + ':feed' => $feed, + ':usr_id' => $user->get_id()) + ); + + return $query->getOneOrNullResult(); + } +}