Class for wrapping PHP stream resources