diff options
author | Urban Müller | 2016-10-19 14:23:31 +0200 |
---|---|---|
committer | Urban Müller | 2016-10-19 14:23:31 +0200 |
commit | 2673b8592aca3f9144bd863c6981a5a3dd3e3628 (patch) | |
tree | 13f8c331fc0a3c0cffca68d999ed727e325e8414 | |
parent | c2d75b17317c49873a7b4332aef7bdd03489b1ad (diff) | |
download | itools-2673b8592aca3f9144bd863c6981a5a3dd3e3628.tar.gz itools-2673b8592aca3f9144bd863c6981a5a3dd3e3628.tar.bz2 itools-2673b8592aca3f9144bd863c6981a5a3dd3e3628.zip |
fix phan warnings
-rw-r--r-- | it_dbi.class | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/it_dbi.class b/it_dbi.class index 77e4615..0e20c87 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -21,6 +21,9 @@ class it_dbi { + var $_found_rows; # public: number of found rows if CALC_FOUND_ROWS was set + var $_data; # semi-public: current result as assoc array + # Default configuration of dbi class var $_defaultconfig = array ( @@ -133,7 +136,7 @@ function createclasses($p = array()) /** * Convert table given by name into a class */ -function createclass($p) +static function createclass($p) { # Shortcut: String config means use this table with default values if (!is_array($p)) @@ -274,7 +277,7 @@ function _set($tags, $allfields = false) * @see select() * @see iterate() */ -function _where($params = "", $dummy_link = null, $omit_where = false) +function _where($params = null, $dummy_link = null, $omit_where = false) { if (is_array($params) && (count($params) > 0)) { @@ -833,7 +836,7 @@ function _get_field_info() return $result; } -function _state_get($dbid) +static function _state_get($dbid) { if (!($result = $GLOBALS['it_dbi']->_state[$dbid])) $result = $GLOBALS['it_dbi']->_state[$dbid] = (array)it_cache::get("dbi:$dbid"); @@ -842,7 +845,7 @@ function _state_get($dbid) return $result; } -function _state_put($dbid, $state, $shared = true) +static function _state_put($dbid, $state, $shared = true) { #var_dump("put", $dbid, $state); $GLOBALS['it_dbi']->_state[$dbid] = $state; @@ -850,7 +853,7 @@ function _state_put($dbid, $state, $shared = true) it_cache::put("dbi:$dbid", array('link' => null) + (array)$state); # link is not transferable } -function _state_purgeshared($dbid = null) +static function _state_purgeshared($dbid = null) { #var_dump("purgeshared", $dbid); it_cache::put("dbi:" . ($dbid ? $dbid : $GLOBALS['it_dbi']->_dbid), array()); # Nuke shared cache |