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

  • DeleteObject
  • FetchBucketProperties
  • FetchCounter
  • FetchMap
  • FetchObject
  • FetchPreflist
  • FetchSet
  • FetchStats
  • IncrementCounter
  • Ping
  • QueryIndex
  • SetBucketProperties
  • StoreObject
  • UpdateMap
  • UpdateSet

Traits

  • BucketTrait
  • IndexTrait
  • LocationTrait
  • ObjectTrait

Exceptions

  • Exception

Class FetchObject

Used to fetch KV objects from Riak

$command = (new Command\Builder\FetchObject($riak))
  ->buildLocation($user_id, 'users', 'default')
  ->build();

$response = $command->execute($command);

$user = $response->getObject();
Basho\Riak\Command\Builder
Extended by Basho\Riak\Command\Builder\FetchObject implements Basho\Riak\Command\BuilderInterface uses Basho\Riak\Command\Builder\ObjectTrait, Basho\Riak\Command\Builder\LocationTrait
Namespace: Basho\Riak\Command\Builder
Author: Christopher Mancini
Located at Riak/Command/Builder/FetchObject.php

Methods summary

public
# __construct( Basho\Riak $riak )

Overrides

Basho\Riak\Command\Builder::__construct
public Basho\Riak\Command\Object\Fetch;
# build( )

Command build

Command build

Returns

Basho\Riak\Command\Object\Fetch;

Implementation of

Basho\Riak\Command\BuilderInterface::build()
public
# withDecodeAsAssociative( )

Tells the client to decode the data as an associative array instead of a PHP stdClass object. Only works if the fetched object type is JSON.

Tells the client to decode the data as an associative array instead of a PHP stdClass object. Only works if the fetched object type is JSON.

Returns


$this
public boolean
# getDecodeAsAssociative( )

Fetch the setting for decodeAsAssociative.

Fetch the setting for decodeAsAssociative.

Returns

boolean
public boolean
# validate( )

Validate command

Validate command

Returns

boolean

Throws

Builder\Exception

Overrides

Basho\Riak\Command\Builder::validate

Methods inherited from Basho\Riak\Command\Builder

getConnection(), getParameters(), getVerbose(), required(), withParameter(), withParameters(), withVerboseMode()

Methods used from Basho\Riak\Command\Builder\ObjectTrait

buildJsonObject(), buildObject(), getObject(), withObject()

Methods used from Basho\Riak\Command\Builder\LocationTrait

atLocation(), buildLocation(), getLocation()

Constants summary

Constants inherited from Basho\Riak\Command\BuilderInterface

COMMAND

Properties summary

protected boolean $decodeAsAssociative
# false

Properties inherited from Basho\Riak\Command\Builder

$headers, $parameters, $riak, $verbose

Properties used from Basho\Riak\Command\Builder\ObjectTrait

$object

Properties used from Basho\Riak\Command\Builder\LocationTrait

$location

Official Riak Client for PHP API documentation generated by ApiGen