51 return $this->database->insertData($insert);
66 return $this->database->getDataRow($select) ?: null;
79 $update->set(
'timestamp', $update->param($this->getCurrentTime()->getTimestamp(),
ELGG_VALUE_TIMESTAMP))
84 return $this->database->updateData($update);
98 return $this->database->deleteData(
$delete);
112 return $this->database->deleteData(
$delete);
126 return $this->database->deleteData(
$delete);
static table(string $table)
Returns a QueryBuilder for updating data in a given table.
deleteExpiredHashes(int $expiration)
Remove all expired hashes from the database.
__construct(protected Database $database)
Create a new service.
deleteAllHashes(\ElggUser $user)
Remove all the hashes associated with a user.
trait TimeUsing
Adds methods for setting the current time (for testing)
static intoTable(string $table)
Returns a QueryBuilder for inserting data in a given table.
Manage the users_remember_me_cookies table.
getCurrentTime($modifier= '')
Get the (cloned) time.
insertHash(\ElggUser $user, string $hash)
Store a hash in the DB.
static fromTable(string $table)
Returns a QueryBuilder for deleting data from a given table.
getRowFromHash(string $hash)
Get the database row for a hash.
const ELGG_VALUE_TIMESTAMP
static fromTable(string $table, string $alias=null)
Returns a QueryBuilder for selecting data from a given table.
updateHash(\ElggUser $user, string $hash)
Update the timestamp of a used hash.
deleteHash(string $hash)
Remove a hash from the DB.