Download the PHP package modera/file-repository-bundle without Composer

On this page you can find all versions of the php package modera/file-repository-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package file-repository-bundle

ModeraFileRepositoryBundle

This bundle provides a high level API for putting your files to virtual file repositories which internally use Gaufrette filesystem abstraction layer.

Installation

Step 1: Download the Bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Enable the Bundle

This bundle should be automatically enabled by Flex. In case you don't use Flex, you'll need to manually enable the bundle by adding the following line in the config/bundles.php file of your project:

And finally check your config/packages/validator.yaml and make sure that validation service is enabled:

Documentation

This bundle proves useful when you need to have a consistent way of storing your files with an ability to later reference these files in your domain model or query them (using Doctrine ORM). Configuration process consists of two steps:

This is a sample filesystem configuration using Gaufrette which creates a filesystem which will use local /path/to/my/filesystem path to store files:

Once low-level filesystem is configured you can create a repository that will manage your files:

When a physical file is put to a repository its descriptor record is created in database that later you can use in your domain logic. For example, having a Doctrine entity which represents a physical may prove useful when you have a user and you want to associate a profile picture with that user. Also it is worth mentioning that once StoredFile entity is removed, its physical file stored in a configured filesystem will be automatically removed as well. This descriptive record saved in database contains a bunch of useful information like mime-type, file extension etc, please see StoredFile's entity fields for more details.

Repository configuration

When you create a repository you can use these configuration properties to tweak behaviour of your repository:

Command line

Bundle ships commands that allow you to perform some standards operations on your repositories and files:

Thumbnails generation

Bundle contains an interceptor that you can use to have thumbnails automatically generated for images when they are stored in a repository, to enable this feature when creating a new repository you need to use modera_file_repository.interceptors.thumbnails_generator.interceptor interceptor:

Configuration key "thumbnail_sizes" can be used to specify what thumbnail size you need to have. With this configuration whenever a picture is uploaded to a repository alternative will be created, for more details see StoredFile::$alternatives, StoredFile::$alternativeOf properties. If you already have a repository and you want to generate thumbnails for it then use modera:file-repository:generate-thumbnails command.

Licensing

This bundle is under the MIT license. See the complete license in the bundle: Resources/meta/LICENSE


All versions of file-repository-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
doctrine/orm Version ^2.5
doctrine/doctrine-bundle Version ^1.6|^2.0
symfony/framework-bundle Version ^3.4|^4.0
knplabs/knp-gaufrette-bundle Version ^0.5
imagine/imagine Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package modera/file-repository-bundle contains the following files

Loading the files please wait ....