X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FEntity%2FConfig.php;h=69393ac93a0b17b80683388338eef4d9d45b6438;hb=540a9bc4a274fc5975b73a66ccf5b91bd3e226f5;hp=2ca4182e6700da790f8f6f02e1fa44701bbee1ed;hpb=a7f1921f7db312b5def3839393357f443dcbb52c;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php index 2ca4182e..69393ac9 100644 --- a/src/Wallabag/CoreBundle/Entity/Config.php +++ b/src/Wallabag/CoreBundle/Entity/Config.php @@ -5,6 +5,7 @@ namespace Wallabag\CoreBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; +use Wallabag\UserBundle\Entity\User; /** * Config. @@ -39,7 +40,7 @@ class Config * @Assert\Range( * min = 1, * max = 100000, - * maxMessage = "This will certainly kill the app" + * maxMessage = "validator.item_per_page_too_high" * ) * @ORM\Column(name="items_per_page", type="integer", nullable=false) */ @@ -67,11 +68,25 @@ class Config * @Assert\Range( * min = 1, * max = 100000, - * maxMessage = "This will certainly kill the app" + * maxMessage = "validator.rss_limit_too_high" * ) */ private $rssLimit; + /** + * @var float + * + * @ORM\Column(name="reading_speed", type="float", nullable=true) + */ + private $readingSpeed; + + /** + * @var string + * + * @ORM\Column(name="pocket_consumer_key", type="string", nullable=true) + */ + private $pocketConsumerKey; + /** * @ORM\OneToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="config") */ @@ -86,7 +101,7 @@ class Config /* * @param User $user */ - public function __construct(\Wallabag\UserBundle\Entity\User $user) + public function __construct(User $user) { $this->user = $user; $this->taggingRules = new ArrayCollection(); @@ -181,7 +196,7 @@ class Config * * @return Config */ - public function setUser(\Wallabag\UserBundle\Entity\User $user = null) + public function setUser(User $user = null) { $this->user = $user; @@ -225,7 +240,7 @@ class Config /** * Set rssLimit. * - * @param string $rssLimit + * @param int $rssLimit * * @return Config */ @@ -239,13 +254,61 @@ class Config /** * Get rssLimit. * - * @return string + * @return int */ public function getRssLimit() { return $this->rssLimit; } + /** + * Set readingSpeed. + * + * @param float $readingSpeed + * + * @return Config + */ + public function setReadingSpeed($readingSpeed) + { + $this->readingSpeed = $readingSpeed; + + return $this; + } + + /** + * Get readingSpeed. + * + * @return float + */ + public function getReadingSpeed() + { + return $this->readingSpeed; + } + + /** + * Set pocketConsumerKey. + * + * @param string $pocketConsumerKey + * + * @return Config + */ + public function setPocketConsumerKey($pocketConsumerKey) + { + $this->pocketConsumerKey = $pocketConsumerKey; + + return $this; + } + + /** + * Get pocketConsumerKey. + * + * @return string + */ + public function getPocketConsumerKey() + { + return $this->pocketConsumerKey; + } + /** * @param TaggingRule $rule *