Download the PHP package eye4web/zf2-site-config without Composer

On this page you can find all versions of the php package eye4web/zf2-site-config. 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 zf2-site-config

Eye4web\SiteConfig

Build Status Code Climate Test Coverage Latest Stable Version License Total Downloads

Introduction

This modules allows you to easily get site config in all of your files. The module can, out-of-the-box, read config values from the following:

Note: This module does not help you write the config, you have to take care of that yourself.

Installation

  1. Run the followng composer command:

  2. Enable it in your application.config.php file.

  3. Copy config/eye4web.siteconfig.global.php.dist to config/autoload/eye4web.siteconfig.global.php

  4. Edit the config to fit your needs

Usage

It is very easy to get config values, anywhere in your files.

View

To get a config value in a view-file(or layout): $this->siteConfig($configKey, $default) $default is optional

Controller

To get a config value in a controller: $this->siteConfig($configKey, $default) $default is optional

Any file from service-manager

This module comes with an initializer, so to get the SiteConfigService into a file, all you have to do is

Configuration

See config/eye4web.siteconfig.global.php.dist for configurable values

Readers

The modules supports many different readers, by deault it uses DoctrineORMReader

DoctrineORM

This reader reads config values from your database. This module is setup to use DoctrineORM by default, so all you have to do is

  1. Create schema
    • Use the doctrine script: php ./vendor/bin/doctrine-module orm:schema-tool:update --force or
    • Create the table yourself, see data/sql folder for schema
  2. Add your config values to the database. You only have to fill key and value, the rest of the fields are just convenience fields

Files

This module uses Zend\Config to read config from files. It can read config from the following file types:

To read config from a file, all you have to do is:

  1. Create your file and add your config values
  2. Edit eye4web.siteconfig.global.php and set the path to your config file

You can read config from a single file, but you can also read from multiple files, just use an array of file names instead of a single string

Create-your-own

It is very easy to create your own reader, just follow these steps:

  1. Create your reader. It must implement Eye4web\SiteConfig\Reader\ReaderInterface
  2. Add your reader to the service-manager
  3. Edit eye4web.siteconfig.global.php and set the name of your reader
  4. Make a pull-request so others can benefit from your reader ;)

All versions of zf2-site-config with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
zendframework/zend-config Version ~2.3|~3.0
zendframework/zend-servicemanager Version ~2.3|~3.0
ocramius/proxy-manager Version ~1.0|~2.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 eye4web/zf2-site-config contains the following files

Loading the files please wait ....