* @package WB * @subpackage base */ WBClass::load('WBResponse' , 'WBString'); /** * Fake response class * * Improved output header * * @version 0.1.0 * @package WB * @subpackage base */ class WBResponse_Fake extends WBResponse { /** * start * */ public function __construct() { } /** * thing send * * @param WBRequest $request * @return bool true un success */ protected function onSend(WBRequest $request) { $size = 0; foreach ($this->_data as $d) { if ('string' == $d['type']) { $size += strlen($d['data']); } } $this->debugPrint('Send Fake Response ' . $size . 'bytes', 1); $this->_data = array(); return true; } /** * send header * * @return bool true on success */ protected function sendHeader() { return true; } }