uniondrug/service-server

server of micro service

1.4 2018-02-01 07:09 UTC

This package is auto-updated.

Last update: 2024-11-09 18:59:30 UTC


README

UnionDrug微服务MicroService服务端producer

  • PHP 7.1+
  • Phalcon 3.2+

Methods

  1. withError(string, int)
  2. withList(array)
  3. withObject(array)
  4. withPaging(array, ResponsePaging)
  5. withSuccess()
  6. setPaging(int, int, int)
public function postAction(){
    $total = 123;
    $page = 3;
    $limit = 15;
    $data = [
        ["id" => 1, "key" => "value"], 
        ["id" => 2, "key" => "value2"]
    ];
    $this->serviceServer->setPaging($total, $page, $limit)->withPaging($data);
}

Directory

└── vendor
    └── uniondrug
        └── service-server
            ├── src
            │   └── Server.php
            └── README.md

Composer

{
    "autoload" : {
        "psr-4" : {
            "UniondrugServiceServer\\" : "vendor/uniondrug/service-server/src"
        }
    }
}