diff options
author | Christian Schneider | 2023-01-30 11:15:11 +0100 |
---|---|---|
committer | Christian Schneider | 2023-01-30 11:15:11 +0100 |
commit | ed2ae9d2124d262d7897701ba97d4e670e150d76 (patch) | |
tree | 06dafd6d583a973b053e632fb23cb697fe3c822a /it_dbi.class | |
parent | 58feaf1507f89e07a68c50174ad6b1bc73d4e30f (diff) | |
download | itools-ed2ae9d2124d262d7897701ba97d4e670e150d76.tar.gz itools-ed2ae9d2124d262d7897701ba97d4e670e150d76.tar.bz2 itools-ed2ae9d2124d262d7897701ba97d4e670e150d76.zip |
Make it_dbi base object iterable, simplify code, add tests
Diffstat (limited to 'it_dbi.class')
-rw-r--r-- | it_dbi.class | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/it_dbi.class b/it_dbi.class index 4efe082..6a2b369 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -20,7 +20,7 @@ */ #[AllowDynamicProperties] -class it_dbi +class it_dbi implements Iterator { static $_global_key = 'it_dbi'; # $GLOBAL key to use for singleton @@ -175,9 +175,8 @@ static function createclass($p) if (substr($classname, 0, 4) != 'PMA_') # It is designed behaviour that an error is generated if this class already exists! { - $interface = function_exists("interface_exists") && interface_exists("Iterator", false) ? "implements Iterator" : ""; $parentname = static::$_global_key; - $code = "class $classname extends $parentname $interface + $code = "class $classname extends $parentname { function __construct(\$query = null, ...\$args) { |