PHP code example of liaosp / guzzle-tool

1. Go to this page and download the library: Download liaosp/guzzle-tool library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

liaosp / guzzle-tool example snippets


class Resources extends ResourcesTool
{
    private $resources;
    /*
     * 微服务url 资源。
     *
     */
    public function __construct($resources = 'goods')
    {
        //配置服务信息。
        $this->ServicesUrl = yaconf('resources');
        parent::__construct($resources);
    }


}

[resources]
goods='http://devzuul.22.com/api/php/product'
order='http://devzuul.22.com/api/php/order'
oauth='http://devoauth.22.com'
personal='http://devzuul.22.com/api/authorize'