PHP Class Basho\Riak\Command\Builder

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();
Mostrar archivo Open project: basho/riak-php-client Class Usage Examples

Protected Properties

Property Type Description
$headers array Command request headers
$parameters array Command parameters
$riak Basho\Riak | null
$verbose

Public Methods

Method Description
__construct ( Riak $riak )
build ( ) Command build
getConnection ( )
getParameters ( )
getVerbose ( )
withParameter ( $key, $value = true )
withParameters ( $parameters = [] )
withVerboseMode ( $verbose = true )

Protected Methods

Method Description
required ( $objectName ) Used to verify a property within the builder is not null and is instantiated
validate ( ) : boolean Validate command

Method Details

__construct() public method

public __construct ( Riak $riak )
$riak Basho\Riak

build() abstract public method

Validates then returns the built command object.
abstract public build ( )

getConnection() public method

public getConnection ( )

getParameters() public method

public getParameters ( )

getVerbose() public method

public getVerbose ( )

required() protected method

Used to verify a property within the builder is not null and is instantiated
protected required ( $objectName )
$objectName

validate() protected method

Method validates if the builder has the parameters / objects required to successfully execute the command
protected validate ( ) : boolean
return boolean

withParameter() public method

public withParameter ( $key, $value = true )

withParameters() public method

public withParameters ( $parameters = [] )

withVerboseMode() public method

public withVerboseMode ( $verbose = true )

Property Details

$headers protected_oe property

Command request headers
protected array $headers
return array

$parameters protected_oe property

Command parameters
protected array $parameters
return array

$riak protected_oe property

protected Riak,Basho|null $riak
return Basho\Riak | null

$verbose protected_oe property

protected $verbose