class ShowPost extends FwController { function execute() { global $IO; $this->input('?','postId')->isInt(); // read variable postId and validate it's an integer $posts = Posts::getInstance(); // the model for the Posts db table $IO->post = $posts->getById($IO->id); // put the post with that id into $IO variable post (will be shown by the template) } }