public function getFollowedDecks() { $this->initConnection(); $res = array(); $res_array = $this->dbQuery('SELECT * FROM subscription WHERE item_type="deck" AND user_id=:id', array('id' => $this->id)); foreach ($res_array as $row) { $deck = new Deck(); $deck->deck_id = $row['item_id']; $deck->id = $deck->getLastRevisionID(); $title = $deck->getTitle(); $deck->title = $deck->shortenTitle($title); $res[] = $deck; } return $res; }