Download the PHP package bluesteel42/settings-bundle without Composer

On this page you can find all versions of the php package bluesteel42/settings-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 settings-bundle

SettingsBundle

A Symfony 2.7+ bundle which allows you to store multiple project configuration settings using different backends for data storage.

Installation

Add this bundle to your project as a composer dependency: simply add a dependency on bluesteel42/settings-bundle to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a dependency on SettingsBundle:

Add the bundle in your application kernel:

Backend Configuration

The SettingsBundle works out of the box without the needing of specific configuration, using the Yaml backend by default and storing data under . If you need to use a different backend just put it in your config.yml:

Valid backends are: yml, xml, doctrinedbal.

Yaml and XML backends

yml and xml backends store data in a file. In order to change the default directory under which the file is stored you must use the extended configuration:

Doctrine DBAL backend

This backend stores data in a database table. By default it uses the bluesteel42_settings table and the Doctrine connection named default.
You can modify one or both these parameters with the extended configuration:

The table can be created using the console command

Please see the command help for more information.

Cache Configuration

The SettingsBundle uses a cache to speed-up data loading and provides adapters for Memcached and file-based cache. A special Null adapter is also provided to let you disable the cache for debugging purposes. The Null adapter is enabled by default.

Each cache adapter has specific configuration options.

NullCache

Since this adapter is enabled by default the following configurations are equivalent:

This adapter does note have further configuration parameters.

File-based cache

This adapter stores the cached data in a cache file placed by default under the directory. This adapter can be enabled with its default configuration with the following keys in your :

If you need to modify the default path under which the cache file is stored just the key:

It is strongly recommended to keep the cache file somewhere under in order to have it cleaned up every time you invoke a console command.

Memcached

This adapter uses the extension to store cached data under one or more memcached servers. Each server must be specified as in the following example:

Usage

The SettingsBundle exposes a bluesteel42.settings that acts as a settings repository.
Each setting value is identified by a key. You can use a dot () to create a key hierarchy.

Get values

Keys can be retrieved using the method

Set values

A key value can be set using the method .

If the value is an array, a subkey is created for each key of the array.

Note that when a key is set the old value will be overridden regardless the existance or not of subkeys. For instance, following the example above:

Delete values

A key can be deleted using the method . The given key and all its subkeys (if any) will be deleted.

Persist changes

Every set of changes must be explicitly persisted. If not, changes will be lost at the end of the execution.
Changes will be persisted by invoking the method .

Tips

Get or set all keys in a single call

You can retrieve all keys with one single call with the method and set all key values with .
Note that since by using subkeys you define a hierarchy the method returns a multidimensional array and - obviously - the method needs a multidimensional array in order to store the data set correctly.

Chainability

The method allows you to chain calls:


All versions of settings-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.9
symfony/framework-bundle Version >=2.7
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 bluesteel42/settings-bundle contains the following files

Loading the files please wait ....