Re: AW: AW: [PEAR-DEV] [RfC] XML_Serializer

From: Date: Wed, 30 Jul 2003 00:01:18 +0000
Subject: Re: AW: AW: [PEAR-DEV] [RfC] XML_Serializer
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-18914@lists.php.net to get a copy of this message
Stephan Schmidt wrote:
Hi,
a) use an option var to map classname=>'toXMLmethod' -- if this is set use it. (if it returns an array, - use that via the serialize array method..)
I'm not sure if I understand, what you want to be included. Is it: serialize( $myObj, array( "serializeMethod" => "myPersonalToXML" );
$serializer = new XML_SimpleSerializer(array( // methods specific to classes. 'methods' => array(
      'myclass1'  => 'quickToXML',
      'myclass2'  => 'fullToXML'
), // default method 'method' => 'toXML' ); $serializer->toXML($data);
and then: $data = $myObj->myPersonalToXML(), if this method exists. Or would you prefer a hash table where a methodname for each class could be specified?
b) attempt to look for a toXML method -- if there is one - use it.
I'll surely implment this.
+1 = I can see this being usefull for a few things..
Me too :-) Stephan


« previous php.pear.dev (#18914) next »