I am really sorry, I was out of my mind when I was asking this question:-) Nette has its abstract layer, for example cache is using it.
But I found, that sessions is using native php functions. So what to do, when I want to save sessions somewhere else? There is some ISessionStorage, but it seems to not be used at all.
Is this what you are looking for?
Or you can implement custom file protocol (
mystorage://) and use it with the Finder
That looks interesting, thank you.
Last edited by arron (2011-08-29 20:24)
Is there implementation for simple file operations, like:
- Check if file/folder present.
- Create dir with desired permissions.
- Process fileperms() or stats(), symlinks.
- Guess file mime-type.
- Simple read/write operations.
Can this be part of util/finder?
Storages\FileStorage could use this common methods.
Some of the classes do have these methods, to some extend, implemented
Moving them to a common class perhaps Files.php under Nette\Utils or Nette\Caching\Storages can be done.
Overall the above methods can be implemented in less than 10kb file size. Not calculating the removal of some codes from some files in Storages and Config.
Building a product based application often requires an installation phase and module update routines. Having them inbuilt in a framework would be great.
The closest would be,
- http://pear.php.net/package/File/ (20%) – more if required, part of which is in Storages/FileStorage
- http://pear.php.net/…e/File_Find/ (60%) – part of which I guess is already in Utils/Finder
- http://pear.php.net/…e/File_Util/ (80%)
- A simple file type guessing based on extension.
To build/deploy a product based on nette framework would require such routines.
Having them build in framework with nette style error handling.
Though implementing the above would be nice, I am in favour of a lightweight framework. :-)
Last edited by vkrishn (2012-03-22 05:52)