ad. serializeable interface:
 
we could define a serializer interface which exports 
tokenizers for the most common types and this could be passed 
to the serializeable callback function so each 
object/resource could serialize itself easily without knowing 
which type of serializer is used. this is getting a bit 
trickier when it comes to unserialization because the object 
would have to implement the serializer interface itself and 
the deserializer serializes itself into an object/resource 
using the object/resources serializer. this would be the most 
generic and simple way i can think of.

it sounds a bit more complex than it is. e.g. if a resource 
serializes itself only as a couple of string tokens it also 
will only have to implement the string tokenizer function in 
its serializer interface for unserialization. so no 
unnecessary typing is needed.

harald

ps.: jani, look, no pgp !

> "Harald Radi" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 
> news:<001d01c1ebb6$04291120$a8eafea9@KNOFFL>...
>  
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> > Following on from my RFC about an interface mechanism, what 
> we really 
> > need is some brainstorming on what interfaces we need or 
> would like to
> 
> > have in PHP.  I'm aiming at PHP 5.
> 
> sounds very interesting and covers with the ideas i proposed 
> a few months ago about creating 'extension families' like 
> db-apis, rpc-apis, xml-processing, payment-apis which have a 
> common set of php-api functions.
> 
> > The following concepts have already been mentioned either 
> by myself or 
> > others as being something we'd like to see in PHP:
> > 
> > DOM XML nodes/documents ---> XSLT processor.
> > Image Handle --> PDF, SWF or some other extension with image 
> > embedding/processing. Socket / Network "behaviours" for streams.
> > Memory Buffer accessors for streams (direct access to memory streams
> > buffers, or access to file contents via mmap or some other 
> mechanism).
> 
> database handle
> rpc handle (i'm working on this at the moment and i'd like to 
> adopt you interface stuff) serializeable (could be a stock 
> interface which markes resources that can be safely 
> serialized/unserialized) ... i had a few more ideas but i 
> don't remember yet, i have to look up my mail archive
> 
> are these interfaces only meant to be applied to resources or 
> are they appliable to zend_class_entries as well ? this would 
> be what i need.
> 
> nice work. +1
> 
> harald
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGP 7.0.4
> 
> iQA/AwUBPMbsL61+myS9SSHxEQL3qgCgrlKBbX80xuZBYoFfOVZFBR34wyoAn0Rb
> B21nA79VbBATkcjVQ/zR02ZB
> =zGjl
> -----END PGP SIGNATURE-----
> 
> ----------
> 
> 


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to