Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21207 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12976 invoked by uid 1010); 13 Dec 2005 19:23:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 12961 invoked from network); 13 Dec 2005 19:23:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Dec 2005 19:23:45 -0000 X-Host-Fingerprint: 66.249.82.206 xproxy.gmail.com Linux 2.4/2.6 Received: from ([66.249.82.206:58264] helo=xproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id E5/41-49905-5BF1F934 for ; Tue, 13 Dec 2005 14:23:33 -0500 Received: by xproxy.gmail.com with SMTP id s7so1328048wxc for ; Tue, 13 Dec 2005 11:22:56 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dV7hF3LqZYkwoXAn51nk8RWaj2WEW49nK8QjU9htFiuGFSJodFJMW/RsAgy0MOhHrtBskYk96/8ow6xAzMKstZydz90yFTLiDHDyWDMRbfRLXAXebnS2sV3Gwa9cfeY0ZDiDX959mSrcmyU4kB+Iql5MuYXzK3/R4B6CXkVkT2Q= Received: by 10.70.117.7 with SMTP id p7mr1818089wxc; Tue, 13 Dec 2005 11:22:55 -0800 (PST) Received: by 10.65.40.15 with HTTP; Tue, 13 Dec 2005 11:22:25 -0800 (PST) Message-ID: Date: Tue, 13 Dec 2005 14:22:25 -0500 To: Dmitry Stogov , internals@lists.php.net In-Reply-To: <000601c60017$ffafffd0$e902a8c0@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <000601c60017$ffafffd0$e902a8c0@thinkpad> Subject: Re: [PHP-DEV] SOAP Question re: Class Mapping & Constructors From: matt.friedman@gmail.com (Matt Friedman) Hi Dmitry, It is understandable that you don't know what the arguments might be. But I would rather have the constructor called with no arguments, or with just the std object `book` passed to the constructor instead of no constructor at all. Is it possible? Thanks, Matt. On 12/13/05, Dmitry Stogov wrote: > 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 =3D new SoapClient("books.wsdl", array('classmap' =3D> > > array('book' =3D> "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 > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- -- Matt Friedman