getUsername() public method

Returns the specified username to access the OrientDB server.
public getUsername ( ) : string
return string
コード例 #1
0
ファイル: HttpBinding.php プロジェクト: doctrine/orientdb-odm
 /**
  * Instantiates a new binding.
  *
  * @param BindingParameters $parameters
  * @param HttpClientAdapterInterface $adapter
  */
 public function __construct(BindingParameters $parameters, HttpClientAdapterInterface $adapter = null)
 {
     $this->server = "{$parameters->getHost()}:{$parameters->getPort()}";
     $this->database = $parameters->getDatabase();
     $this->adapter = $adapter ?: new CurlClientAdapter(new CurlClient());
     $this->setAuthentication($parameters->getUsername(), $parameters->getPassword());
 }
コード例 #2
0
 public function testCustomParameters()
 {
     $parameters = new BindingParameters(TEST_ODB_HOST, TEST_ODB_HTTP_PORT, TEST_ODB_USER, TEST_ODB_PASSWORD, TEST_ODB_DATABASE);
     $this->assertSame(TEST_ODB_HOST, $parameters->getHost());
     $this->assertSame(TEST_ODB_HTTP_PORT, $parameters->getPort());
     $this->assertSame(TEST_ODB_USER, $parameters->getUsername());
     $this->assertSame(TEST_ODB_PASSWORD, $parameters->getPassword());
     $this->assertSame(TEST_ODB_DATABASE, $parameters->getDatabase());
 }
コード例 #3
0
 public function __construct(BindingParameters $parameters)
 {
     $this->client = $client = new PhpOrient($parameters->getHost(), $parameters->getPort());
     $this->clusterMap = $client->dbOpen($parameters->getDatabase(), $parameters->getUsername(), $parameters->getPassword());
 }