public function __get($var) { switch ($var) { case 'response_code': case 'message': case 'data': case 'callback': return $this->{$var}; break; } }