Lines Matching refs:this

82         $this->associations_table_name = "oid_associations";
83 $this->nonces_table_name = "oid_nonces";
97 $this->connection = $connection;
104 if (is_subclass_of($this->connection, 'db_common')) {
105 $this->connection->setFetchMode(DB_FETCHMODE_ASSOC);
109 $this->associations_table_name = $associations_table;
113 $this->nonces_table_name = $nonces_table;
116 $this->max_nonce_age = 6 * 60 * 60;
123 $this->connection->autoCommit(false);
126 $this->sql = array();
130 $this->setSQL();
135 list($missing, $empty) = $this->_verifySQL();
152 $this->_fixSQL();
157 return !$this->isError(
158 $this->connection->query(
179 if ($this->isError($obj)) {
201 $this->connection->query(sprintf("DELETE FROM %s",
202 $this->associations_table_name));
204 $this->connection->query(sprintf("DELETE FROM %s",
205 $this->nonces_table_name));
226 if (!array_key_exists($key, $this->sql)) {
228 } else if (!$this->sql[$key]) {
243 'value' => $this->nonces_table_name,
249 'value' => $this->associations_table_name,
264 if (is_array($this->sql[$k])) {
265 foreach ($this->sql[$k] as $part_key => $part_value) {
266 $this->sql[$k][$part_key] = sprintf($part_value,
270 $this->sql[$k] = sprintf($this->sql[$k], $value);
288 $this->connection->autoCommit(true);
289 $n = $this->create_nonce_table();
290 $a = $this->create_assoc_table();
291 $this->connection->autoCommit(false);
302 if (!$this->tableExists($this->nonces_table_name)) {
303 $r = $this->connection->query($this->sql['nonce_table']);
304 return $this->resultToBool($r);
311 if (!$this->tableExists($this->associations_table_name)) {
312 $r = $this->connection->query($this->sql['assoc_table']);
313 return $this->resultToBool($r);
324 return $this->connection->query($this->sql['set_assoc'],
336 if ($this->resultToBool($this->_set_assoc(
339 $this->blobEncode(
345 $this->connection->commit();
347 $this->connection->rollback();
356 $result = $this->connection->getRow($this->sql['get_assoc'],
358 if ($this->isError($result)) {
370 $result = $this->connection->getAll($this->sql['get_assocs'],
373 if ($this->isError($result)) {
382 if ($this->_get_assoc($server_url, $handle) == null) {
386 if ($this->resultToBool($this->connection->query(
387 $this->sql['remove_assoc'],
389 $this->connection->commit();
391 $this->connection->rollback();
400 $assoc = $this->_get_assoc($server_url, $handle);
407 $assocs = $this->_get_assocs($server_url);
422 $assoc->secret = $this->blobDecode($assoc->secret);
425 $this->removeAssociation($server_url, $assoc->handle);
456 $sql = $this->sql['add_nonce'];
457 $result = $this->connection->query($sql, array($server_url,
460 if ($this->isError($result)) {
461 $this->connection->rollback();
463 $this->connection->commit();
465 return $this->resultToBool($result);
476 return $this->_add_nonce($server_url, $timestamp, $salt);
541 $this->connection->query($this->sql['clean_nonce'], array($v));
542 $num = $this->connection->affectedRows();
543 $this->connection->commit();
549 $this->connection->query($this->sql['clean_assoc'],
551 $num = $this->connection->affectedRows();
552 $this->connection->commit();