Giter Club home page Giter Club logo

aliyun-mns-php-sdk's Introduction

MNS SDK for PHP

Aliyun MNS Documents: https://www.aliyun.com/product/mns

Aliyun MNS Console: https://mns.console.aliyun.com

Intall Composer

To install composer by following commands, or see composer

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Install & Use

Add require to your composer.json

{
  "require": {
     "aliyun/aliyun-mns-php-sdk": ">=1.0.0"
  }
}

Use Composer to install requires

composer install

Note: php version>=5.5.0, and xml extension of php is required.

Samples

Queue Sample Topic Sample

aliyun-mns-php-sdk's People

Contributors

liuquanhao avatar souriki avatar xdkxlk avatar zd-double avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aliyun-mns-php-sdk's Issues

SubscriptionAttributes.php composer更新问题

SubscriptionAttributes.php 我看最新的更新是6月份,但是composer包的更新是4月份,这个用composer装不上最新的问题按呀,辛苦尽快更新一下composer。

代码内处理异常响应的逻辑存在错误

如果遇到参数异常等错误,这个代码块里面引用了两个未定义变量。一个是 $statusCode 一个是 $exception 其他的文件内都存在类似错误 改下把你们。

private function parseNormalErrorResponse($xmlReader)
{
$result = XMLParser::parseNormalError($xmlReader);
if ($result['Code'] == Constants::QUEUE_NOT_EXIST)
{
throw new QueueNotExistException($statusCode, $result['Message'], $exception, $result['Code'], $result['RequestId'], $result['HostId']);
}
if ($result['Code'] == Constants::INVALID_ARGUMENT)
{
throw new InvalidArgumentException($statusCode, $result['Message'], $exception, $result['Code'], $result['RequestId'], $result['HostId']);
}
if ($result['Code'] == Constants::MALFORMED_XML)
{
throw new MalformedXMLException($statusCode, $result['Message'], $exception, $result['Code'], $result['RequestId'], $result['HostId']);
}
throw new MnsException($statusCode, $result['Message'], $exception, $result['Code'], $result['RequestId'], $result['HostId']);
}

Document is empty

你们,我们在线上使用阿里云消息发布订阅消息,偶尔会出现下面的报错,请问这是什么原因导致的
XMLReader::read():parser error : Document is empty

aliyun-mns-php-sdk/Samples/Queue/CreateQueueAndSendMessage.php 逻辑不完整

aliyun-mns-php-sdk/Samples/Queue/CreateQueueAndSendMessage.php
这个代码中, 这句
$res = $queue->receiveMessage(30);
从对列中取消息,如果取到的消息为空,又如何处理呢, 能否把这个逻辑补上,告诉我们 $res 没取到消息会是什么样

Java 的代码中,有以下的内容
Message popMsg = queue.popMessage();
if (popMsg != null){
}

代码报错

Samples\Topic\TopicSubscribe.php文件171行多了个s

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.