/** * Creates a post. * * @param $userid * * @param $text * * @param array $tags */ public function CreatePost($userid, $text, $tags = ['Music']) { $data = ['authorid' => $userid, 'author' => $this->database->IDToUsername($userid), 'text' => $text]; $this->database->AddPost($userid, json_encode($tags), json_encode($data)); }