* @license PHP License * @package WB * @subpackage base */ WBClass::load( 'WBRest' ); /** * HTTP XML request class * * * * @version 0.2.1 * @package WB * @subpackage base */ class WBRest_Serializer extends WBStdClass { /** * format string of server error * * @var string */ protected $errorFrame = '%s: %s'; /** * debug flag * @param bool */ protected $debug = false; /** * Receive server error as formated string to send to response object * * @param string $no * @param string $msg * @return string */ public function sprintfError($no, $msg) { return sprintf($this->errorFrame, $no, $msg); } /** * Switch debug mode * * Allow to set debug flag * * @param bool $debug */ public function setDebug($debug) { $this->debug = $debug; } /** * Unserialize Request * * Convert Request body to data array * * @param string $body * @return array $data */ public function unserialize($body) { return array(); } /** * Serialize data * * Convert array data for response * * @param array $data * @return string $body */ public function serialize($data) { return ''; } }