From c24687f11c1fdabb2cfa30f6a01c019a2085344a Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Tue, 5 Jan 2021 13:44:14 +0100 Subject: Remove support for obsolete _read_post_process/_write_pre_process, use static _read_postprocess/_write_preprocess instead --- it_dbi.class | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/it_dbi.class b/it_dbi.class index 344976a..23a7be0 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -473,26 +473,6 @@ function _fatal($text, $body = null) } -/** - * Post-process data after reading a record. - * This is a stub-function that can be overloaded. - */ -function _read_post_process() -{ -} - - -/** - * Pre-process data before writing a record. - * This is a stub-function that can be overloaded. - * @param $tags Reference to update/create tags, can be modified as needed - * @param $command SQL command ('INSERT', 'REPLACE' or 'UPDATE') - */ -function _write_pre_process(&$tags, $command) # NOPHPLINT FIXME 2020-12 CS Remove legacy hooks now replace by pure and static versions -{ -} - - /** * Hook to postprocess data after reading a record. * This is a stub-function that can be overloaded. @@ -771,8 +751,6 @@ function iterate() if ($this->_p['unbuffered']) $this->_result->close(); } - - $this->_read_post_process(); } else $this->_nofetch = false; @@ -796,7 +774,6 @@ function insert($tags = array(), $command = "INSERT") /* Pre-processing, $tags is passed by reference and may be modified here */ $tags = static::_write_preprocess($tags); - $this->_write_pre_process($tags, $command); if ($this->_p['randomid'] && !isset($tags[$this->_p['keyfield']])) $tags[$this->_p['keyfield']] = bin2hex(random_bytes(16)); @@ -855,7 +832,6 @@ function update($tags = array(), $where = null) /* Pre-processing, $tags is passed by reference and may be modified here */ $tags = static::_write_preprocess($tags); - $this->_write_pre_process($tags, 'UPDATE'); if ($set = $this->_set($tags, isset($where))) { -- cgit v1.2.3