Use module name instead of hardcoded "example" in __get().

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11567 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2009-08-14 09:44:15 +00:00
commit f4e3444ae3

View file

@ -2046,7 +2046,7 @@ public:
Printf(s_phpclasses, "\t}\n");
} else {
Printf(s_phpclasses, "\n\tfunction __get($var) {\n");
Printf(s_phpclasses, "\t\tif ($var === 'thisown') return swig_example_get_newobject($this->%s);\n", SWIG_PTR);
Printf(s_phpclasses, "\t\tif ($var === 'thisown') return swig_%s_get_newobject($this->%s);\n", module, SWIG_PTR);
Printf(s_phpclasses, "\t\telse return $this->%s[$var];\n", SWIG_DATA);
Printf(s_phpclasses, "\t}\n");
}