/* {{{ proto Riak\BucketPropertyList Riak\Bucket->getPropertyList() Fetch and return a RiakBucketProperties object with properties for this bucket */ PHP_METHOD(RiakBucket, getPropertyList) { riak_connection *connection; RIACK_STRING bucketName; uint32_t nVal = 3; uint8_t allowMult = 0; int riackResult; zval *zBucketProps, *zAllowMult, *zNVal; GET_RIAK_CONNECTION_RETURN_EXC_ON_ERROR(connection) bucketName = riack_name_from_bucket(getThis() TSRMLS_CC); riackResult = riack_get_bucket_props(connection->client, bucketName, &nVal, &allowMult); CHECK_RIACK_STATUS_THROW_AND_RETURN_ON_ERROR(connection, riackResult); MAKE_STD_ZVAL(zNVal); ZVAL_LONG(zNVal, nVal); MAKE_STD_ZVAL(zAllowMult); ZVAL_BOOL(zAllowMult, allowMult); MAKE_STD_ZVAL(zBucketProps); object_init_ex(zBucketProps, riak_bucket_properties_ce); RIAK_CALL_METHOD2(RiakBucketProperties, __construct, zBucketProps, zBucketProps, zNVal, zAllowMult); RETVAL_ZVAL(zBucketProps, 0, 1); zval_ptr_dtor(&zNVal); zval_ptr_dtor(&zAllowMult); }
void RiakTest::GetBucketProperty() { const char* id = "f057fbee-d7a4-43a3-b761-163f243730ab"; riack_string rbucket; rbucket.len = strlen(id); rbucket.value = (char*)id; riack_bucket_properties* props; riack_get_bucket_props(m_riak, &rbucket, &props); riack_free_bucket_properties_p(m_riak, &props); }