public function getSubscriptionsCount()
    {
        $cache = Podium::getInstance()->podiumCache->getElement('user.subscriptions', $this->id);
        if ($cache === false) {
            $cache = (new Query)->from(Subscription::tableName())->where([
                    'user_id' => $this->id,
                    'post_seen' => Subscription::POST_NEW
                ])->count();
            Podium::getInstance()->podiumCache->setElement('user.subscriptions', $this->id, $cache);
        }
        return $cache;
    }
public function getSubscriptionsCount()
    {
        $cache = Podium::getInstance()->podiumCache->getElement('user.subscriptions', $this->id);
        if ($cache === false) {
            $cache = (new Query)->from(Subscription::tableName())->where([
                    'user_id' => $this->id,
                    'post_seen' => Subscription::POST_NEW
                ])->count();
            Podium::getInstance()->podiumCache->setElement('user.subscriptions', $this->id, $cache);
        }
        return $cache;
    }
public function getSubscriptionsCount ( ) { $ cache = Podium :: getInstance ( ) -> podiumCache -> getElement ( 'user.subscriptions' , $ this -> id ) ; if ( $ cache === false ) { $ cache = ( new Query ) -> from ( Subscription :: tableName ( ) ) -> where ( [ 'user_id' => $ this -> id , 'post_seen' => Subscription :: POST_NEW ] ) -> count ( ) ; Podium :: getInstance ( ) -> podiumCache -> setElement ( 'user.subscriptions' , $ this -> id , $ cache ) ; } return $ cache ; }
Returns number of user subscribed threads with new posts.
@return int
Returns number of user subscribed threads with new posts .