PHP Class Basho\Riak\Command\Builder\StoreObject

$command = (new Command\Builder\StoreObject($riak)) ->buildObject('{"firstName":"John","lastName":"Doe","email":"[email protected]"}') ->buildBucket('users') ->build(); $response = $command->execute(); $user_location = $response->getLocation();
Inheritance: extends Basho\Riak\Command\Builder, implements Basho\Riak\Command\BuilderInterface, use trait ObjectTrait, use trait Basho\Riak\Command\Builder\LocationTrait
Mostra file Open project: basho/riak-php-client Class Usage Examples

Protected Properties

Property Type Description
$decodeAsAssociative boolean

Public Methods

Method Description
build ( ) : Basho\Riak\Command\Object\Store
getDecodeAsAssociative ( ) : boolean Fetch the setting for decodeAsAssociative.
validate ( )
withDecodeAsAssociative ( ) Tells the client to decode the data as an associative array instead of a PHP stdClass object.

Method Details

build() public method

public build ( ) : Basho\Riak\Command\Object\Store
return Basho\Riak\Command\Object\Store

getDecodeAsAssociative() public method

Fetch the setting for decodeAsAssociative.
public getDecodeAsAssociative ( ) : boolean
return boolean

validate() public method

public validate ( )

withDecodeAsAssociative() public method

Only works if the fetched object type is JSON.

Property Details

$decodeAsAssociative protected_oe property

protected bool $decodeAsAssociative
return boolean