Download the PHP package raphhh/balloon without Composer

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

Balloon - A tiny file data access layer (csv, json, xml, yaml)

Latest Stable Version Build Status Scrutinizer Quality Score Code Coverage Total Downloads Reference Status License

Balloon is a file data access layer which supports different kinds of data formats.

It help you to get, add, modify or remove data (CRUD basic actions) from files like csv, json, xml or yaml.

You can work with objects or with arrays. With arrays, Balloon will extract the data of the file and gives you a list of array for every data. With objects, Balloon will map these data with objects of a specific class of your choice. Then, you can also work with specific collections of objects.

Finally, you can work with different file system abstractions (local, cloud,...). Balloon provides an adapter to use Gaufrette (but you can also add your own adapter).

Installation

Execute Composer:

Supported file formats

CRUD actions

Work with objects

With the object usage, Balloon will map data of your file into objects of a specific class.

Init

(Note that the pk is not mandatory. Id of object will be simple index.)

Get objects

Add object

Modify object

Remove object

Work with arrays

With the array usage, Balloon will map data of your file into arrays.

Init

Get data

Add data

Modify data

Remove data

Cache

The cache of Balloon prevents to access to the same file more than once when you try to read it.

You can invalidate the cache with the method "Balloon::invalidate()".

Unit of work

The unit of work of Balloon prevents to access to the same file more than once when you try to write it. So, that means you have to flush Balloon if you want to write into the file.

You can also rollback your modifications (only if you have not flushed!).

Object Mapping

Object

Balloon uses the JMS Serializer to serialize the objects.

This library can work with yaml, xml or annotations to map the data to their object.

For example, if you use annotations:

You can redefine the default Serializer in the second arg of the Balloon Factory:

For more information about JMS Serializer, see the documentation.

Collection

By default, if you work with a collection of data, Balloon returns an array of these data.

But if you work with objects for data, you can also work with specific collection class. You just have to declare a class with the same name as your data class, but in plural. This class will receive an array of the objects as first arg of the constructor.

For example, if you work with data object of the class 'Foo', you can declare a class 'Foos' as a collection.

Filesystem abstraction

By default, Balloon will read and write locally. But you can use other drivers, and work with other kind of filesystems.

The best way to proceed is to use a library such Gaufrette. Balloon provides an adapter for this library.

Extending Balloon

You can extend Balloon by creating a child:

But to instantiate easily this new class, you should also extend BalloonFactory and specify the name of your class:

Then you can use BeachBallFactory to create BeachBall in a same way than Balloon:


All versions of balloon with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
icanboogie/inflector Version ~1.3
symfony/yaml Version ~3.0
jms/serializer 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 raphhh/balloon contains the following files

Loading the files please wait ....