定制 mawdoo3com/waraqa-integration 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mawdoo3com/waraqa-integration

最新稳定版本:2.4.4

Composer 安装命令:

composer require mawdoo3com/waraqa-integration

包简介

This package is callback api to publish articles from waraqa platform

README 文档

README

This package an integration SDK for waraqa services, also it connects to cloudamqp.com the RabbitMQ cloud base service.

To install this package:

composer require mawdoo3com/waraqa-integration

Consumer Usage:

<?php

use Waraqa\Connection\WAMQPConnect;
use PhpAmqpLib\Message\AMQPMessage;
use Waraqa\Consumer;

class WaraqaIntegration
{

    public function execute()
    {
        $client_id = getenv('CLIENT_ID');//will provided by waraqa admin
        $connection_string = getenv('AQMP_CONNECTION');//will provided by waraqa admin
        $connection_obj = new WAMQPConnect($connection_string, $client_id);
        $connection = $connection_obj->connect();

        $consumer = new Consumer();
        $consumer->consume($connection, [$this, 'process']);
    }

    public function process(AMQPMessage $message)
    {
        //your code goes here, this is the callback function
    }
}

Producer Usage:

<?php

use Waraqa\Connection\WAMQPConnect;
use Waraqa\Producer;

class WaraqaIntegration
{

    public function execute()
    {
        $client_id = getenv('CLIENT_ID');//will provided by waraqa admin
        $connection_string = getenv('AQMP_CONNECTION');//will provided by waraqa admin
        $connection_obj = new WAMQPConnect($connection_string, $client_id);
        $connection = $connection_obj->connect();

        $producer = new Producer();
        $producer->produce($connection,'message',[param1,param2,...etc]);
    }
}

统计信息

  • 总下载量: 67.33k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-13