Hi!

I would prefer to have these particular getters (and maybe ever
setters) somewhere else, like in a derivated SplFile. That would give
us more flexibility and cleaner APIs fro something that does not
really fit in default streams anyway (or rarely).

touch(), chmod(), etc. aren't "rarely" used. They are used in alomst any app, everywhere. Right now every file wrapper - such as vfsStream mentioned before - is useless for transparent wrapping of the filesystem, since it can not cover these functions. And if you do an extension wrapping streams, you have to manually override these, which sucks big time, since it goes against the whole idea of streams abstraction. That means you can't test it, you can't use it for abstraction, nothing. Adding these functions into SplFile solves nothing - the whole point of streams is that they work with usual file functions, not require some separate class. If I needed separate class with its own functions, I won't be needing streams.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to