Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21206 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7194 invoked by uid 1010); 13 Dec 2005 19:05:14 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 7179 invoked from network); 13 Dec 2005 19:05:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Dec 2005 19:05:14 -0000 X-Host-Fingerprint: 84.204.52.251 promo.hnet.spb.ru OpenBSD 3.0-3.4 Received: from ([84.204.52.251:44999] helo=promo.hnet.spb.ru) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id A5/A0-49905-96B1F934 for ; Tue, 13 Dec 2005 14:05:13 -0500 Received: from thinkpad (unknown [10.1.0.118]) by promo.hnet.spb.ru (Postfix) with ESMTP id A58371BACD5; Tue, 13 Dec 2005 22:00:43 +0300 (MSK) To: "'Matt Friedman'" , Date: Tue, 13 Dec 2005 22:04:02 +0300 Message-ID: <000601c60017$ffafffd0$e902a8c0@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 In-Reply-To: Importance: Normal Subject: RE: [PHP-DEV] SOAP Question re: Class Mapping & Constructors From: dmitry@zend.com ("Dmitry Stogov") References: Hi Matt, During SOAP envelope deserialization, objects are created indirectly. So constructors are not called (constructor may need arguments). This is not a bug. Thanks. Dmitry. > -----Original Message----- > From: Matt Friedman [mailto:matt.friedman@gmail.com] > Sent: Tuesday, December 13, 2005 9:49 PM > To: internals@lists.php.net > Subject: [PHP-DEV] SOAP Question re: Class Mapping & Constructors > > > Hi, > > We are using the built-in SOAP extension. > > From the docs: > $server = new SoapClient("books.wsdl", array('classmap' => > array('book' => "MyBook"))); > > Soap server will return a complex data type 'book'. The data > fields for book will be mapped to the php class' data fields > in MyBook. It seems that the constructor for MyBook is never > called (according to our tests). The data fields are mapped > somehow internally. > > If I want MyBook to be much more than just a data container, > then I can foresee that I will often want/need a constructor > but __construct is not called. > > Could this be considered a bug? Any thoughts? > > -- > -- Matt Friedman > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >