Exemple #1
0
 function __construct($host = "127.0.0.1", $port = 3000)
 {
     parent::__construct();
     $config = ["hosts" => [["addr" => $host, "port" => $port]]];
     $this->_aerospike = new \Aerospike($config);
     if (!$this->_aerospike->isConnected()) {
         throw new ConnectionFailedException("Connection failed. [{$this->_aerospike->error()}]", $this->_aerospike->errorno());
     }
 }
Exemple #2
0
 function __construct($host, $port, $dbName, $collectionName)
 {
     parent::__construct();
     $this->host = $host;
     $this->port = $port;
     $this->dbName = $dbName;
     $this->collectionName = $collectionName;
     $this->connect();
     $this->createIndexes();
 }
Exemple #3
0
 function __construct($file)
 {
     parent::__construct();
     $this->file = $file;
     $this->createScheme();
 }