From 226098dbf14fc5921d26767721fdde5aecbecf45 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Thu, 4 Mar 2010 19:42:30 +0000 Subject: get prefix from parent classname --- it_xml.class | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/it_xml.class b/it_xml.class index 7dd82c7..d22dc23 100644 --- a/it_xml.class +++ b/it_xml.class @@ -334,11 +334,13 @@ function error() function set($vals) { + $prefix = it::match(".*_", get_class($this)); + if (is_array($vals)) { foreach ($vals as $key => $val) { - $classname = $this->_p['prefix'] . $this->_make_identifier($key); + $classname = $prefix . $this->_make_identifier($key); if (!class_exists($classname)) eval("class $classname extends it_xml {}"); -- cgit v1.2.3