You are here

function OAuthStoreOracle::__construct in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.2 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::__construct()
  2. 7.3 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::__construct()
  3. 7.4 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::__construct()
  4. 7.5 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::__construct()
  5. 7.6 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::__construct()

Construct the OAuthStoreMySQL. In the options you have to supply either:

  • server, username, password and database (for a mysql_connect)
  • conn (for the connection to be used)

Parameters

array options:

File

lib/oauth-php/library/store/OAuthStoreOracle.php, line 59

Class

OAuthStoreOracle

Code

function __construct($options = array()) {
  if (isset($options['conn'])) {
    $this->conn = $options['conn'];
  }
  else {
    $this->conn = oci_connect(DBUSER, DBPASSWORD, DBHOST);
    if ($this->conn === false) {
      throw new OAuthException2('Could not connect to database');
    }

    // $this->query('set character set utf8');
  }
}