johnsn / drizzle

基于Guzzle构建的Docker API库。

dev-master 2013-10-20 10:02 UTC

This package is not auto-updated.

Last update: 2024-09-23 16:00:19 UTC


README

稳定: 构建状态 开发: 构建状态

为Packagist构建的一个简单的Docker远程API,基于Guzzle。

示例

<?php

require_once __DIR__ . "/vendor/autoload.php";

use Johnsn\Drizzle\Drizzle;

//$endpoint = 'http://127.0.0.1:4243', $version = 'v1.6'
$drizzle = new Drizzle();
$drizzle->connect();

//Return the current docker version
$data = $drizzle->version();

/**
 * $data:
 * array(2) {
 *   ["status"]=>
 *   int(200)
 *   ["data"]=>
 *   array(3) {
 *     ["Version"]=>
 *     string(5) "0.6.4"
 *     ["GitCommit"]=>
 *     string(7) "2f74b1c"
 *     ["GoVersion"]=>
 *     string(7) "go1.1.2"
 *   }
 * }
 */

var_dump($data);