Lines Matching refs:this

95         $this->associations_table_name = "oid_associations";
96 $this->nonces_table_name = "oid_nonces";
110 $this->connection = $connection;
117 if (is_subclass_of($this->connection, 'db_common')) {
118 $this->connection->setFetchMode(DB_FETCHMODE_ASSOC);
122 $this->associations_table_name = $associations_table;
126 $this->nonces_table_name = $nonces_table;
129 $this->max_nonce_age = 6 * 60 * 60;
136 $this->connection->autoCommit(false);
139 $this->sql = [];
143 $this->setSQL();
148 list($missing, $empty) = $this->_verifySQL();
165 $this->_fixSQL();
170 return !$this->isError(
171 $this->connection->query(
192 if ($this->isError($obj)) {
214 $this->connection->query(sprintf("DELETE FROM %s",
215 $this->associations_table_name));
217 $this->connection->query(sprintf("DELETE FROM %s",
218 $this->nonces_table_name));
239 if (!array_key_exists($key, $this->sql)) {
241 } else if (!$this->sql[$key]) {
256 'value' => $this->nonces_table_name,
264 'value' => $this->associations_table_name,
281 if (is_array($this->sql[$k])) {
282 foreach ($this->sql[$k] as $part_key => $part_value) {
283 $this->sql[$k][$part_key] = sprintf($part_value, $value);
286 $this->sql[$k] = sprintf($this->sql[$k], $value);
304 $this->connection->autoCommit(true);
305 $n = $this->create_nonce_table();
306 $a = $this->create_assoc_table();
307 $this->connection->autoCommit(false);
318 if (!$this->tableExists($this->nonces_table_name)) {
319 $r = $this->connection->query($this->sql['nonce_table']);
320 return $this->resultToBool($r);
327 if (!$this->tableExists($this->associations_table_name)) {
328 $r = $this->connection->query($this->sql['assoc_table']);
329 return $this->resultToBool($r);
347 return $this->connection->query($this->sql['set_assoc'],
360 if ($this->resultToBool($this->_set_assoc(
363 $this->blobEncode(
369 $this->connection->commit();
371 $this->connection->rollback();
383 $result = $this->connection->getRow($this->sql['get_assoc'],
385 if ($this->isError($result)) {
399 $result = $this->connection->getAll($this->sql['get_assocs'],
402 if ($this->isError($result)) {
411 if ($this->_get_assoc($server_url, $handle) == null) {
415 if ($this->resultToBool($this->connection->query(
416 $this->sql['remove_assoc'],
418 $this->connection->commit();
420 $this->connection->rollback();
429 $assoc = $this->_get_assoc($server_url, $handle);
436 $assocs = $this->_get_assocs($server_url);
451 $assoc->secret = $this->blobDecode($assoc->secret);
454 $this->removeAssociation($server_url, $assoc->handle);
489 $sql = $this->sql['add_nonce'];
490 $result = $this->connection->query($sql, [
495 if ($this->isError($result)) {
496 $this->connection->rollback();
498 $this->connection->commit();
500 return $this->resultToBool($result);
511 return $this->_add_nonce($server_url, $timestamp, $salt);
580 $this->connection->query($this->sql['clean_nonce'], [$v]);
581 $num = $this->connection->affectedRows();
582 $this->connection->commit();
588 $this->connection->query($this->sql['clean_assoc'], [time()]);
589 $num = $this->connection->affectedRows();
590 $this->connection->commit();