Download the PHP package rohea/file-storage without Composer

On this page you can find all versions of the php package rohea/file-storage. 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-storage

FileStorage

FileStorage is an object oriented file storage abstraction library for PHP5. It allows you to easily read and write files to any supported file storage backends with a simple an consistent API. FileStorage also supports storing metadata if the storage backend supports it.

Why FileStorage?

There are a number of different ways to store your files when you're building an application with PHP. There's the local file system of the server, distributed systems such as GridFS and MogileFS and of course there are cloud-based CDN solutions such as Amazon S3 and many more.

From application point of view, it's not optimal to deeply bind your implementation to any single storage backend, as there might be a need to be able to change that later. For example, you might first use a local filesystem when you start developing but the change to a more advanced solution when the application matures. This is when FileStorage becomes handy. Using the simple API of FileStorage you are able to change the storage backend without needing to change the code using it.

Features

Storage backends (feel free to contribute more, this is a work in progress :)

Usage

The very first thing you need to do is install this library and configure autoloading of code files. It's very easy if you can use Composer for installing and you're using a framework with PSR-0 compatible autoloader. If you're not, I hope you know how to do your magic otherwise :)

When the library is in, you need to prepare adapters with you application specific configurations and then pass the adapter to the instance. The easiest example is for local filesystem adapter

After that, you're ready to use the FileStorage

That's how simple it is. You just need to pick a key for your file and you're on. On the other hand, of course, there are also a bit more advanced ways to use the library. See examples below

Choosing a key

The FileStorage library doesn't force you to pick any particular key structure. You can use what you will. But here's our recommendation

This kind of key structure helps you to avoid key collisions because of namespacing and it's suits well for most of the adapters because slashes convert to folders for local adapter and so on.

Motivation

Firstly, I want to say that FileStorage is heavily inspired by the very nice and already quite well known Gaufrette library which also pretty much aims for the same goal as FileStorage. So why re-inventing the wheel? Whereas I really do like the approach of Gaufrette and I've actually taken many design choices almost 'as is' from it, I still think there are some other pieces of design I really don't like (probably they're partially legacy, but still). I've even tried to contribute to Gaufrette to solve them (in friendly co-operation with the maintainers) but Gaufrette is already so widely used and the necessary changes so fundamental that some major unwanted BC breaks would have been necessary. So instead of trying to push my different solution to an already established lib, I finally decided to make my own.


All versions of file-storage with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
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 rohea/file-storage contains the following files

Loading the files please wait ....