@param int    $replyCode
@param string $replyText
@param string $classId
@param string $methodId

@return \AMQP\Wire\Writer
500498
public function channelClose($options)
    {
        $args = new Writer();
        $args->writeShort($options['reply_code'])
            ->writeShortStr($options['reply_text'])
            ->writeShort($options['method_signature'][0])
            ->writeShort($options['method_signature'][1]);
        return $args;
    }
502398
public function sendNotificationInOne( $subscriber, $contentObject, $commentList = null, $tpl = null )
    {
         if ( is_null( $tpl ) )
         {
             $tpl = eZTemplate::factory();
         }
         $tpl->setVariable( 'subscriber', $subscriber );
         $tpl->setVariable( 'contentobject', $contentObject );
         if ( !is_null( $commentList ) )
         {
            $tpl->setVariable( 'comment_list', $commentList );
         }
         $subject = $tpl->fetch( $this->multiSubjectTemplatePath );
         $body = $tpl->fetch( $this->multiBodyTemplatePath );
         $this->executeSending( $subject, $body, $subscriber );
    }
27649
@Override
   public void writeClassBody(Definition def, Writer out) throws IOException
   {
      int indent = 1;
      out.write("public interface " + getClassName(def));
      writeLeftCurlyBracket(out, 0);
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * Receive message\n");
      writeWithIndent(out, indent, " * @param msg String.\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "public void onMessage(String msg);");

      writeRightCurlyBracket(out, 0);
   }
260847
public function checkCoupon($code, $articleNumber)
    {
        $requestData = new Check\RequestData($code, $articleNumber);
        $request = new Check\Request($requestData);

        return $this->sendRequest($request, Check\ApiResponse::class);
    }
610969
def return_msg(self, reply_code, reply_text, exchange, routing_key):
        '''
        
        '''
        args = Writer()
        args.write_short(reply_code).\
            write_shortstr(reply_text).\
            write_shortstr(exchange).\
            write_shortstr(routing_key)

        self.send_frame(MethodFrame(self.channel_id, 60, 50, args))
124563
public function close($reply_code = 0, $reply_text = '', $method_sig = array(0, 0))
    {
        $this->callbacks = array();
        if ($this->is_open === false || $this->connection === null) {
            $this->do_close();

            return null; // already closed
        }
        list($class_id, $method_id, $args) = $this->protocolWriter->channelClose(
            $reply_code,
            $reply_text,
            $method_sig[0],
            $method_sig[1]
        );

        try {
            $this->send_method_frame(array($class_id, $method_id), $args);
        } catch (\Exception $e) {
            $this->do_close();

            throw $e;
        }

        return $this->wait(array(
            $this->waitHelper->get_wait('channel.close_ok')
        ), false, $this->channel_rpc_timeout );
    }
67962
protected function CreateObject($methodKey, $entity, $responseClassName = null, $entityId = null, $subEntityId = null, $idempotencyKey = null)
    {
        if (is_null($entityId)) {
            $urlMethod = $this->GetRequestUrl($methodKey);
        } elseif (is_null($subEntityId)) {
            $urlMethod = sprintf($this->GetRequestUrl($methodKey), $entityId);
        } else {
            $urlMethod = sprintf($this->GetRequestUrl($methodKey), $entityId, $subEntityId);
        }

        $requestData = null;
        if (!is_null($entity)) {
            $requestData = $this->BuildRequestData($entity);
        }

        $rest = new RestTool(true, $this->_root);
        $response = $rest->Request($urlMethod, $this->GetRequestType($methodKey), $requestData, $idempotencyKey);

        if (!is_null($responseClassName)) {
            return $this->CastResponseToEntity($response, $responseClassName);
        }

        return $response;
    }
18489
private function formatReplyMarkup(TelegramTypes $replyMarkup): TelegramTypes
    {
        if ($replyMarkup instanceof Markup) {
            $replyMarkup->inline_keyboard = $this->getArrayFromKeyboard($replyMarkup->inline_keyboard);
        } elseif ($replyMarkup instanceof ReplyKeyboardMarkup) {
            $replyMarkup->keyboard = $this->getArrayFromKeyboard($replyMarkup->keyboard);
        }

        return $replyMarkup;
    }
247425
public function edit($commentId, $body)
	{
		// Build the request path.
		$path = '/gists/comments/' . (int) $commentId;

		// Build the request data.
		$data = json_encode(
			array(
				'body' => $body
			)
		);

		// Send the request.
		$response = $this->client->patch($this->fetchUrl($path), $data);

		// Validate the response code.
		if ($response->code != 200)
		{
			// Decode the error response and throw an exception.
			$error = json_decode($response->body);
			throw new \DomainException($error->message, $response->code);
		}

		return json_decode($response->body);
	}
1103967
void createMethodBody(String classname, ExecutableElement methodElement, List<String> arguments, Writer writer) throws IOException {
		String methodName = getMethodName(methodElement);
		boolean ws = isWebsocketDataService(methodElement);
		String args = stringJoinAndDecorate(arguments, COMMA, new NothingDecorator());
		String keys = computeKeys(methodElement, arguments);
		createReturnOcelotPromiseFactory(classname, methodName, ws, args, keys, writer);
	}
468056
public function cancelSubscription($subscriptionId, \DateTime $cancellationDate = null, $cancellationNote = null)
    {
        $requestData = new Cancel\RequestData($subscriptionId);
        $requestData->setCancellationDate($cancellationDate);
        $requestData->setCancellationNote($cancellationNote);

        $request = new Cancel\Request($requestData);

        return $this->sendRequest($request, Cancel\ApiResponse::class);
    }
971477
public function send(Message $message, $messageCode, $expectedResponseCode)
    {
        $payload  = $this->encodeMessage($message, $messageCode);
        $stream   = $this->connection->send($payload);

        return $this->receiveMessage($stream, $expectedResponseCode);
    }
240955
void writeMethodComment(String methodComment, Iterator<String> argumentsType, Iterator<String> argumentsName, TypeMirror returnType, Writer writer) throws IOException {
		writer.append(TAB2).append("/**").append(CR);
		// From javadoc
		writeJavadocComment(methodComment, writer);
		// Arguments
		writeArgumentsComment(argumentsType, argumentsName, writer);
		// Return
		writeReturnComment(returnType, writer);
		writer.append(TAB2).append(" */").append(CR);
	}
507172
public function postComment($post_id, $text, $comment_id = 0)
    {
        $this->checkId($post_id);

        $params = [
            'text' => $text,
            'parent_id' => $comment_id
        ];

        return $this->adapter->put(sprintf('/comments/%d', $post_id), $params);
    }
670515
public static void reply(AutoReply reply) {
		if(FbBotApi.botDefinition == null) {
			botDefinition = new FbBotApiBot();
		}
		((FbBot)FbBotApi.botDefinition).reply(reply);
	}
328760
public function reply_link( $reply_text = 'Reply' ) {
		if ( is_singular() && comments_open() && get_option('thread_comments') ) {
			wp_enqueue_script('comment-reply');
		}

		// Get the comments depth option from the admin panel
		$max_depth = get_option('thread_comments_depth');

		// Default args
		$args = array(
			'add_below' => 'comment',
			'respond_id' => 'respond',
			'reply_text' => $reply_text,
			'depth' => $this->depth() + 1,
			'max_depth' => $max_depth,
		);

		return get_comment_reply_link($args, $this->ID, $this->post_id);
	}
1185855
public function receiveMessage(ProtoStream $stream, $messageCode)
    {
        $response = $this->connection->receive($stream);
        $class    = $this->classForCode($messageCode);
        $respCode = $response[0];
        $respBody = $response[1];

        if ($respCode != $messageCode) {
            throw $this->createResponseException($respCode, $respBody);
        }

        if ($class == null) {
            return;
        }

        return Protobuf::decode($class, (string) $respBody);
    }