Official Riak Client for PHP
  • Namespace
  • Class
  • Tree

Namespaces

  • Basho
    • Riak
      • Api
        • Http
          • Translator
      • Command
        • Bucket
        • Builder
          • MapReduce
          • Search
          • TimeSeries
        • DataType
          • Counter
          • Map
          • Set
        • Indexes
        • MapReduce
        • Object
        • Search
          • Index
          • Schema
        • Stats
        • TimeSeries
          • Query
      • DataType
      • Node
        • Builder
      • Search
      • TimeSeries

Classes

  • Builder
  • Object
  • Ping
  • Response
  • Stats

Interfaces

  • BuilderInterface

Exceptions

  • Exception

Class Builder

This class follows the Builder design pattern and is the preferred method for creating Basho\Riak\Command objects for interacting with your Riak data cluster.

use Basho\Riak\Command;
use Basho\Riak\Bucket;
use Basho\Riak\Location;

$bucket = new Bucket('users');

$command = (new Command\Builder(Command::STORE_OBJECT))
     ->withObject(new Object('test_data'))
     ->atLocation(new Location('test_key', $bucket))
     ->build();

Direct known subclasses

Basho\Riak\Command\Builder\DeleteObject, Basho\Riak\Command\Builder\FetchBucketProperties, Basho\Riak\Command\Builder\Ping, Basho\Riak\Command\Builder\QueryIndex, Basho\Riak\Command\Builder\Search\DeleteIndex, Basho\Riak\Command\Builder\Search\FetchIndex, Basho\Riak\Command\Builder\Search\FetchObjects, Basho\Riak\Command\Builder\Search\FetchSchema, Basho\Riak\Command\Builder\Search\StoreIndex, Basho\Riak\Command\Builder\Search\StoreSchema, Basho\Riak\Command\Builder\SetBucketProperties, Basho\Riak\Command\Builder\StoreObject, Basho\Riak\Command\Builder\FetchCounter, Basho\Riak\Command\Builder\TimeSeries\DeleteRow, Basho\Riak\Command\Builder\TimeSeries\FetchRow, Basho\Riak\Command\Builder\TimeSeries\Query, Basho\Riak\Command\Builder\TimeSeries\StoreRows, Basho\Riak\Command\Builder\UpdateMap, Basho\Riak\Command\Builder\UpdateSet, Basho\Riak\Command\Builder\FetchMap, Basho\Riak\Command\Builder\FetchObject, Basho\Riak\Command\Builder\FetchPreflist, Basho\Riak\Command\Builder\FetchSet, Basho\Riak\Command\Builder\FetchStats, Basho\Riak\Command\Builder\IncrementCounter, Basho\Riak\Command\Builder\MapReduce\FetchObjects

Indirect known subclasses

Basho\Riak\Command\Builder\Search\AssociateIndex, Basho\Riak\Command\Builder\Search\DissociateIndex, Basho\Riak\Command\Builder\TimeSeries\DescribeTable

Abstract
Namespace: Basho\Riak\Command
Author: Christopher Mancini
Located at Riak/Command/Builder.php

Methods summary

public
# __construct( Basho\Riak $riak )
abstract public
# build( )

Command build

Command build

Validates then returns the built command object.

public
# withParameter( $key, $value = true )
public
# withParameters( $parameters = [] )
public
# withVerboseMode( $verbose = true )
public
# getParameters( )
public
# getConnection( )
public
# getVerbose( )
protected boolean
# validate( )

Validate command

Validate command

Method validates if the builder has the parameters / objects required to successfully execute the command

Returns

boolean

Throws

Basho\Riak\Command\Builder\Exception
protected
# required( $objectName )

Used to verify a property within the builder is not null and is instantiated

Used to verify a property within the builder is not null and is instantiated

Parameters

$objectName

Throws

Basho\Riak\Command\Builder\Exception

Properties summary

protected Basho\Riak|null $riak
# null
protected array $parameters

Command parameters

Command parameters

# []
protected array $headers

Command request headers

Command request headers

# []
protected boolean $verbose
# false
Official Riak Client for PHP API documentation generated by ApiGen