Re: SOAP Question re: Class Mapping & Constructors

From: Date: Tue, 13 Dec 2005 19:22:25 +0000
Subject: Re: SOAP Question re: Class Mapping & Constructors
References: 1 2  Groups: php.internals php.internals 
Request: Send a blank email to internals+get-21208@lists.php.net to get a copy of this message
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 <dmitry@zend.com> 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 = 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 > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- -- Matt Friedman

« previous php.internals (#21208) next »