Download the PHP package alex-kalanis/kw_files without Composer
On this page you can find all versions of the php package alex-kalanis/kw_files. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alex-kalanis/kw_files
More information about alex-kalanis/kw_files
Files in alex-kalanis/kw_files
Package kw_files
Short Description Accessing stored entries as files on some volume
License BSD-3-Clause
Informations about the package kw_files
kw_files
Manage access to storage with emulation of tree structure of real filesystem. Necessary for key-value storages. It can also behave the correct way when storing data on classical filesystems. Basically it equalize access to storage structure as tree without need to care if it is an actual tree.
PHP Installation
(Refer to Composer Documentation if you are not familiar with composer)
PHP Usage
1.) Use your autoloader (if not already done via Composer autoloader)
2.) Add some external packages with connection to the local or remote storages. If you use local volume you can skip this step. If you use memory as storage (like for tests) you also need underlying package . Or package which implements local interfaces for things like AWS or your custom CDN.
3.) Connect the correct processing libraries into your app. The correct one depends on your storage. You can use directly with pass of configuration values which set the correct adapter. Or in your DI set the implementing classes of interfaces from which will access your storage and use them in custom extension of . This is the way when you use more storages at once. Each storage will have own instance of adapter.
4.) Call adapter via DI and use storage to access files. Beware that paths are defined as arrays of strings. The final separator of each level in tree depends on your storage! This way it is possible to emulate trees even on flat key-value storages.
Changes
- 5.0 - uses DateTime, tests with separated classes
- 4.0 - changed behavior against streams
- 3.0 - has extended support of actions over files, got some things from other repositories
- 2.0 - has difference in interface and class tree building for free name lookup
- 1.0 - initial version
Notes to self: - all entries starts internally with the separators (usually slashes). It is not necessary and sometimes counter-productive to add them when setting the starting dir. It behaves like a prefix.
All versions of kw_files with dependencies
alex-kalanis/kw_storage Version >=6.0 <7
ext-mbstring Version *
php Version >=7.4.0