Stores the parsed annotations to the Aerospike database. This adapter is suitable for production. use Phalcon\Annotations\Adapter\Aerospike; $annotations = new Aerospike([ 'hosts' => [ ['addr' => '127.0.0.1', 'port' => 3000] ], 'persistent' => true, 'namespace' => 'test', 'prefix' => 'annotations_', 'lifetime' => 8600, 'options' => [ \Aerospike::OPT_CONNECT_TIMEOUT => 1250, \Aerospike::OPT_WRITE_TIMEOUT => 1500 ] ]);
Inheritance: extends Base
Example #1
0
 /**
  * @dataProvider providerReadWrite
  * @param string $key
  * @param mixed $data
  */
 public function testShouldReadAndWriteToAerospikeWithPrefix($key, $data)
 {
     $object = new Aerospike(['hosts' => [['addr' => TEST_AS_HOST, 'port' => TEST_AS_PORT]], 'prefix' => 'test_']);
     $object->write($key, $data);
     $this->assertEquals($data, $object->read($key));
 }