Download the PHP package pollen-solutions/filesystem without Composer
On this page you can find all versions of the php package pollen-solutions/filesystem. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pollen-solutions/filesystem
More information about pollen-solutions/filesystem
Files in pollen-solutions/filesystem
Package filesystem
Short Description Pollen Solutions - Filesystem Component - Abstraction layer of file storage library Flysystem.
License MIT
Homepage https://www.presstify.com/pollen-solutions/filesystem/
Informations about the package filesystem
Filesystem Component
Pollen Solutions Filesystem Component is an abstraction layer of file storage library Flysystem.
Installation
Basic Usage
API
The API of the pollen solutions filesystem is identical to that of Flysystem which it inherits. More information on Flysystem online official documentation.
Storage Manager inherits the Filesystem instance's methods from its default disk and provides other methods to access other declared disk instances.
Sets a custom default filesystem
The default disk is created from public dir of the web application, it accessible via native PHP function getcwd. But the risk is that you could delete, overwrite ... files essential to the functioning of your application.
For this security convenients, it is preferable to config your own default fallback disk with better file permissions.
Register a local disk
From a local dir path
With a custom local filesystem instance
With a custom local filesystem instance and with custom adapter instance
More information about filesystem architecture on Flysystem online official documentation.
Extended Local Filesystem API.
One of the main advantages of using Pollen Solutions Filesystem instead Flysystem, is that it is coupled with a system of HTTP request. This allows to extend the API of Flystem with some practical features.
Local Image Filesystem
Pollen Solutions Filesystem provides a specific Filesystem and its adapter for the local image files.
Register a local image filesystem
Create a custom local image filesystem instance
Local Image Filesystem extended API
S3 Filesystem
Advanced Usage
Uses native or third-party Filesystem and Adapter
Flysystem has a variety of Filesystems and adapters, sometimes provided by third party library.
Examples :
You might need to use one of them and implement it in Pollen Solutions Filesystem Component.
This example uses Flysystem FTP Adapter. First of all, Flysystem FTP Adapter requires a new dependency installation.
Create your own filesystem driver
All versions of filesystem with dependencies
league/flysystem Version ^2.0
pollen-solutions/http Version ^1.0
pollen-solutions/support Version ^1.0