nokaut/restclient-shop-bundle

商店REST客户端 - symfony2组件包

此包的官方仓库似乎已消失,因此包已被冻结。

dev-master 2013-07-12 05:50 UTC

This package is not auto-updated.

Last update: 2022-03-27 23:39:50 UTC


README

安装

  1. 在composer.json的require部分添加一行
"nokaut/restclient-shop-bundle": "dev-master"
  1. 更新依赖项 composer update
  2. 将ApiClientBundle添加到AppKernel
    $bundles = array(
        ...
        new Nokaut\Bundle\ApiClientBundle\ApiClientBundle()
    );

配置

#app/config/config.yml:

api_client:
    key_public: "yourPublicKey"
    key_private: "yourPrivateKey"

使用

您需要做的所有事情,就是从容器中获取服务

$nokautClient = $this->get('nokaut.client');

一些客户端使用的示例,您可以从这里获取: https://github.com/GrupaNokaut/orderAPI/blob/master/example/simple.php