diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2020-11-08 17:22:39 +0100 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2020-11-08 17:22:39 +0100 |
commit | dfa766f738959f0e857c26e7b8336e76db493c73 (patch) | |
tree | 577ee07a7c523ffcc9bc860b8cdc733f2b646d72 /ratatoeskr/sys | |
parent | 8631e22affed6eb59cedc4bf7b02ec569b9a4d50 (diff) | |
download | ratatoeskr-cms-dfa766f738959f0e857c26e7b8336e76db493c73.tar.gz ratatoeskr-cms-dfa766f738959f0e857c26e7b8336e76db493c73.tar.bz2 ratatoeskr-cms-dfa766f738959f0e857c26e7b8336e76db493c73.zip |
Remove unused functions/classes
Diffstat (limited to 'ratatoeskr/sys')
-rw-r--r-- | ratatoeskr/sys/db.php | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/ratatoeskr/sys/db.php b/ratatoeskr/sys/db.php index 9272256..9efa9ec 100644 --- a/ratatoeskr/sys/db.php +++ b/ratatoeskr/sys/db.php @@ -12,7 +12,6 @@ use r7r\cms\sys\Database; use r7r\cms\sys\Env; -use r7r\cms\sys\DbTransaction; if (!defined("SETUP")) { require_once(dirname(__FILE__) . "/../config.php"); @@ -21,18 +20,6 @@ if (!defined("SETUP")) { require_once(dirname(__FILE__) . "/utils.php"); /** - * Substitutes "PREFIX_" in the input string with the prefix from the config. - * - * @param mixed|string $q - * @return string - * @deprecated Use {@see Database::subPrefix()} instead. - */ -function sub_prefix($q): string -{ - return Env::getGlobal()->database()->subPrefix((string)$q); -} - -/** * Prepares statement (1st argument) like {@see Database::prepStmt()} and executes it with the remaining arguments. * * @param mixed ...$args @@ -48,38 +35,3 @@ function qdb(...$args): PDOStatement return Env::getGlobal()->database()->query((string)$args[0], ...array_slice($args, 1)); } - -/** - * Makes using transactions easier. - * - * @deprecated Use {@see DbTransaction} instead. - */ -class Transaction -{ - /** @var DbTransaction */ - private $tx; - - /** - * Start a new transaction. - */ - public function __construct() - { - $this->tx = new DbTransaction(Env::getGlobal()->database()); - } - - /** - * Commit the transaction. - */ - public function commit(): void - { - $this->tx->commit(); - } - - /** - * Roll the transaction back. - */ - public function rollback(): void - { - $this->tx->rollback(); - } -} |