All pastes #335089 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-02-01 03:10 UTC
rendered paste body
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)
  }
}