Skip to content

digota/digota-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Digota - ecommerce microservice

digota-php

php client for digota

PREREQUISITES

  • php >=5.5
  • phpize
  • pecl
  • phpunit
  • composer
  • protoc

Install

Composer

composer require digota/digota-php
{
    "name": "your project",
    "require": {
      "digota/digota-php": "dev-master"
      }
  }

Example

<?php

require dirname(__FILE__).'/vendor/autoload.php';

 $client = new \Productpb\ProductServiceClient('localhost:3051', [
      // send client cert
     'credentials' => Grpc\ChannelCredentials::createSsl(file_get_contents(dirname(__FILE__).'/client.com.pem'))
     //'credentials' => Grpc\ChannelCredentials::createInsecure()
 ]);

$request = new Productpb\GetRequest();
$request->SetId("e5aae05c-880c-11e7-ba5e-6354e0d1e8c5");

// async 
var_dump($client->Get($request));

// sync
var_dump($client->Get($request)->wait());

About

php client for digota server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published