コード例 #1
0
 /**
  * Creates a connection to a cluster.
  *
  * Creates a CouchbaseCluster object and begins the bootstrapping
  * process necessary for communications with the Couchbase Server.
  *
  * @param string $connstr A cluster connection string to connect with.
  * @param string $username The username for the cluster.
  * @param string $password The password for the cluster.
  *
  * @throws CouchbaseException
  */
 public function __construct($connstr = 'couchbase://127.0.0.1/', $username = '', $password = '')
 {
     $this->_dsn = cbdsn_parse($connstr);
 }
コード例 #2
0
 /**
  * Creates a connection to a cluster.
  *
  * Creates a CouchbaseCluster object and begins the bootstrapping
  * process necessary for communications with the Couchbase Server.
  *
  * @param string $dsn A cluster DSn to connect with.
  * @param string $username The username for the cluster.
  * @param string $password The password for the cluster.
  *
  * @throws CouchbaseException
  */
 public function __construct($dsn = 'http://127.0.0.1/', $username = '', $password = '')
 {
     $this->_dsn = cbdsn_parse($dsn);
 }