/** * Возврат информации об ошибки в JSON-сериализованном виде * * @return string строка в json с кодом ошибки закодированная в JSON */ private function to_json() { $response = array('code' => $this->getCode() != 0 ? $this->getCode() : 503, 'message' => $this->getMessage()); return joosText::json_encode($response); }