public static function delete($domain_name, $item_name)
 {
     SimpleDbPersister::init();
     $client = SimpleDbClient::factory(array('key' => SimpleDbPersister::$AWS_KEY, 'secret' => SimpleDbPersister::$AWS_SECRET_KEY, 'region' => SimpleDbPersister::REGION));
     $result = $client->deleteAttributes(array('DomainName' => $domain_name, 'ItemName' => $item_name));
     return $result;
 }
Esempio n. 2
0
 /**
  * @param string $tableName
  */
 protected function createDomain($domainName)
 {
     try {
         $domain = $this->client->domainMetadata(array('DomainName' => $domainName));
     } catch (NoSuchDomainException $e) {
         $this->client->createDomain(array('DomainName' => $domainName));
         $domain = $this->client->domainMetadata(array('DomainName' => $domainName));
     } catch (SimpleDbException $e) {
         throw new KeyValueStoreException($e->getMessage(), 0, $e);
     }
     return $domain;
 }
 public function testCanCreate()
 {
     $c = SimpleDbClient::factory(array('key' => 'foo', 'secret' => 'bar', 'region' => 'us-east-1'));
     $this->assertEquals('https://sdb.amazonaws.com', $c->getBaseUrl());
     $this->assertNotNull($c->getDescription());
 }
Esempio n. 4
0
 /**
  * @depends testSelectsItems
  */
 public function testDeleteDomains()
 {
     $this->client->deleteDomain(array('DomainName' => $this->domainName));
 }