File: README.md

package info (click to toggle)
simplesamlphp 1.19.7-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 42,920 kB
  • sloc: php: 202,044; javascript: 14,867; xml: 2,700; sh: 225; perl: 82; makefile: 70; python: 5
file content (110 lines) | stat: -rw-r--r-- 4,359 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Riak Client for PHP (PhpFastCache Fork)
#### (Fork of the official basho/riak due to maintainer significant inactivity)

[![Packagist](https://img.shields.io/packagist/v/phpfastcache/riak-client.svg?maxAge=2592000)](https://packagist.org/packages/phpfastcache/riak-client)

**Riak PHP Client** is a library which makes it easy to communicate with [Riak](http://basho.com/riak/), an open source, distributed database that focuses on high availability, horizontal scalability, and *predictable*
latency. This library communicates with Riak's HTTP interface using the cURL extension. If you want to communicate with Riak using the Protocol Buffers interface, use the [Official PHP PB Client](https://github.com/basho/riak-phppb-client). Both Riak and this library are maintained by [Basho Technologies](http://www.basho.com/). 

To see other clients available for use with Riak visit our [Documentation Site](http://docs.basho.com/riak/latest/dev/using/libraries)


1. [Installation](#installation)
1. [Documentation](#documentation)
1. [Contributing](#contributing)
	* [An honest disclaimer](#an-honest-disclaimer)
1. [Roadmap](#roadmap)
1. [License and Authors](#license-and-authors)


## Installation

### Dependencies
- PHP 5.4+ (Up to PHP 7.2 with the 1.4.4 update provided by PhpFastCache)
- PHP Extensions: curl, json and openssl [required for security features]
- Riak 2.1+
- [Composer PHP Dependency Manager](https://getcomposer.org/)

### Composer Install

This library has been added to [Packagist](https://packagist.org/packages/phpfastcache/) to simplify the installation process. Run the following [composer](https://getcomposer.org/) command:

```console
$ composer require "phpfastcache/riak-client": "^1.4.4"
```

Alternately, manually add the following to your `composer.json`, in the `require` section:

```javascript
"require": {
    "phpfastcache/riak-client": "^1.4.4"
}
```

And then run `composer update` to ensure the module is installed.

## Documentation

* Master: [![Build Status](https://secure.travis-ci.org/basho/riak-php-client.png?branch=master)](http://travis-ci.org/basho/riak-php-client)

A fully traversable version of the API documentation for this library can be found on [Github Pages](http://basho.github.io/riak-php-client). 

### Example Usage

Below is a short example of using the client. More substantial sample code is available [in examples](/examples).

```php
// lib classes are included via the Composer autoloader files
use Basho\Riak;
use Basho\Riak\Node;
use Basho\Riak\Command;

// define the connection info to our Riak nodes
$nodes = (new Node\Builder)
    ->onPort(10018)
    ->buildCluster(['riak1.company.com', 'riak2.company.com', 'riak3.company.com',]);

// instantiate the Riak client
$riak = new Riak($nodes);

// build a command to be executed against Riak
$command = (new Command\Builder\StoreObject($riak))
    ->buildObject('some_data')
    ->buildBucket('users')
    ->build();
    
// Receive a response object
$response = $command->execute();

// Retrieve the Location of our newly stored object from the Response object
$object_location = $response->getLocation();
```

## Contributing

This repo's maintainers are engineers at Basho and we welcome your contribution to the project! You can start by reviewing [CONTRIBUTING.md](CONTRIBUTING.md) for information on everything from testing to coding standards.

### An honest disclaimer

Due to our obsession with stability and our rich ecosystem of users, community updates on this repo may take a little longer to review. 

The most helpful way to contribute is by reporting your experience through issues. Issues may not be updated while we review internally, but they're still incredibly appreciated.

Thank you for being part of the community! We love you for it. 

## Roadmap

* Current develop & master branches contain feature support for Riak version 2.1+
* Add support for Riak TS Q2 2016

## License and Authors

### Active authors
* Author: Georges.L (https://github.com/Geolim4)

### Former authors
* Author: Christopher Mancini (https://github.com/christophermancini)
* Author: Alex Moore (https://github.com/alexmoore)
* Author: Luke Bakken (https://github.com/lukebakken)

Copyright (c) 2015 Basho Technologies, Inc. Licensed under the Apache License, Version 2.0 (the "License"). For more details, see [License](License).