hkvstore / richfilemanager-php
PHP connector for RichFilemanager
Installs: 10 248
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 36
Type:project
Requires
- php: >= 8.1.0
- illuminate/config: 5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|8.*|9.*|10.*|11.*
- illuminate/container: 5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|8.*|9.*|10.*|11.*
- laravel/helpers: ^1.5.0
- symfony/event-dispatcher: ^5.0|^6.0|^7.0
- symfony/http-foundation: ^4.4|^5.0|^6.0|^7.0
- dev-master
- v2.2.0
- v2.2.0-beta.1
- v2.1.0
- v2.0.0
- v1.4.0
- v1.3.9
- v1.3.8
- v1.3.7
- v1.3.6
- v1.3.5
- v1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.9
- v1.2.8
- v1.2.7
- v1.2.6
- v1.2.5
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-psolom-master
- dev-dev
This package is auto-updated.
Last update: 2024-10-20 03:07:03 UTC
README
This package is the part of RichFilemanager project.
Requires PHP >= 5.6.4
Introduction
PHP connector provides a flexible way to manage you files at different king of storages. There are 2 storages supported out of the box:
Configuration details for each are described below. You create implementation for any other storage that you wish by implementing Api and Storage classes.
Installation
composer require servocoder/richfilemanager-php
NOTE: Most likely you won't have to install PHP connector separately. It's sufficient to run composer of the main package. Check out the installation guide of RichFilemanager main package for PHP connector.
AWS PHP SDK
If you are going to use AWS S3 storage make sure that AWS PHP SDK package version >= 3.18.0 is added to the "require" section of RichFilemanager composer.json file:
{ "require": { "servocoder/richfilemanager-php": "*", "aws/aws-sdk-php": "^3.18.0" } }
FYI - Amazon PHP SDK installation guide: https://docs.aws.amazon.com/aws-sdk-php/v3/guide/getting-started/installation.html
Entry point setup
RichFilemanager provides entry point script out of the box, so you don't have to create it from scratch. In this section you can find explanations and examples to setup the entry script.
- Initiate application.
$app = new \RFM\Application();
- Create and set storage class instance. Usually you will use a single storage, but it's possible initiate instances for various storages to use both in API. For example, AWS S3 API can use S3 storage instance to manage original files and Local storage to manage image thumbnails. More details in the Configuration section.
// local filesystem storage $local = new \RFM\Repository\Local\Storage(); $app->setStorage($local); // AWS S3 storage instance $s3 = new \RFM\Repository\S3\Storage(); $app->setStorage($s3);
- Create and set API class instance. You can set only one API instance unlike storage instances.
// local filesystem API $app->api = new RFM\Api\LocalApi();
OR
// AWS S3 API $app->api = new RFM\Api\AwsS3Api();
- Run application.
$app->run();
Documentation
The Wiki pages provide articles that details the following subjects:
MIT LICENSE
Released under the MIT license.