function execute() { $dao = new PostDAO(); $res = ''; $res = '{"records":' . json_encode($dao->readAll()) . '}'; return $res; }