diff options
Diffstat (limited to 'bindings/lang_php5_helpers/php_code.py')
-rw-r--r-- | bindings/lang_php5_helpers/php_code.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bindings/lang_php5_helpers/php_code.py b/bindings/lang_php5_helpers/php_code.py index 5c175f87..fc4a2f95 100644 --- a/bindings/lang_php5_helpers/php_code.py +++ b/bindings/lang_php5_helpers/php_code.py @@ -149,8 +149,12 @@ function getRequestTypeFromSoapMsg($mesg) { print >> self.fd, '' if m.name == method_prefix + 'new_from_dump': - print >> self.fd, ' public static function newFromDump($dump) {' - print >> self.fd, ' return cptrToPhp(%s($dump));' % m.name + if len(m.args) == 1: + print >> self.fd, ' public static function newFromDump($dump) {' + print >> self.fd, ' return cptrToPhp(%s($dump));' % m.name + else: + print >> self.fd, ' public static function newFromDump($server, $dump) {' + print >> self.fd, ' return cptrToPhp(%s($server->_cptr, $dump));' % m.name # XXX: Else throw an exception print >> self.fd, ' }' print >> self.fd, '' |