The streamWrapper class
Allows you to implement your own protocol handlers and streams for use with all the other filesystem functions (such as fopen, fread etc.).
Intro
Allows you to implement your own protocol handlers and streams for use with all the other filesystem functions (such as fopen(), fread() etc.).
This is NOT a real class, only a prototype of how a class defining its own protocol should be.
Implementing the methods in other ways than described here can lead to undefined behaviour.
An instance of this class is initialized as soon as a stream function tries to access the protocol it is associated with.
Class synopsis
Properties
- resource
context The current context, or null if no context was passed to the caller function.
Use the
stream_context_get_options()to parse the context.NoteThis property must be public so PHP can populate it with the actual context resource.
See Also
- stream.streamwrapper.example-1
stream_wrapper_register()stream_wrapper_unregister()stream_wrapper_restore()
Streamwrapper