diff options
author | Eudyptula <eitan@mosenkis.net> | 2009-07-07 18:23:56 -0400 |
---|---|---|
committer | Eudyptula <eitan@mosenkis.net> | 2009-07-07 18:23:56 -0400 |
commit | beb238596be8f4e6f7a0ebd9a1eb35ae715e4dce (patch) | |
tree | 01e4ea42d59971d3c52b5db06ea890bbb2bf3844 /shared | |
parent | Remove interactive merging from class update script; allow classes that are i... (diff) | |
download | ingenue-beb238596be8f4e6f7a0ebd9a1eb35ae715e4dce.tar.gz ingenue-beb238596be8f4e6f7a0ebd9a1eb35ae715e4dce.tar.bz2 ingenue-beb238596be8f4e6f7a0ebd9a1eb35ae715e4dce.zip |
Got rid of ugly hacks for abstract classes and used ReflectionClass instead
Diffstat (limited to 'shared')
-rw-r--r-- | shared/classes/0sql_row_obj.php | 4 | ||||
-rw-r--r-- | shared/classes/1conf_build_common.php | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/shared/classes/0sql_row_obj.php b/shared/classes/0sql_row_obj.php index ebff3be..564da0a 100644 --- a/shared/classes/0sql_row_obj.php +++ b/shared/classes/0sql_row_obj.php @@ -507,7 +507,9 @@ abstract class sql_row_obj { // If the name of this class changes, it must be up } foreach (get_declared_classes() as $class) { if (is_subclass_of($class, 'sql_row_obj')) { - if (substr($class, 0, 4) !== 'sql_') continue; // TODO FIXME BAD! In 5.3.0, use a different way of checking if it's abstract + $r=new ReflectionClass($class); + if (!$r->isInstantiable()) continue; + unset($r); $obj=new $class(); if ($obj->table == $table) { self::$table_cache[$table]=$class; diff --git a/shared/classes/1conf_build_common.php b/shared/classes/1conf_build_common.php index 406ebc1..4e74d09 100644 --- a/shared/classes/1conf_build_common.php +++ b/shared/classes/1conf_build_common.php @@ -1,6 +1,5 @@ <?php -// TODO In 5.3.0, this can be static without causing fatal errors trying to instantiate it -class conf_build_common extends sql_row_obj { +abstract class conf_build_common extends sql_row_obj { private $info; private function set_vars() { if (isset($this->info)) { |