Overview

Namespaces

  • malkusch
    • bav
  • PHP

Classes

  • Agency
  • AutomaticUpdatePlan
  • BAV
  • Configuration
  • ConfigurationRegistry
  • DataBackendContainer
  • DefaultConfiguration
  • DoctrineBackendContainer
  • FileDataBackendContainer
  • LogUpdatePlan
  • PDODataBackendContainer
  • UpdatePlan
  • Overview
  • Namespace
  • Class
  • Tree

Class ConfigurationRegistry

Registry for the configuration

BAV uses this static container for its runtime configuration. Per default the registry is initialized with the malkusch\bav\DefaultConfiguration. You can set your own configuration with malkusch\bav\ConfigurationRegistry::setConfiguration() or preferably by providing the file bav/configuration.php. This file should return a malkusch\bav\Configuration object:

<?php

namespace malkusch\bav;

$configuration = new DefaultConfiguration();

$pdo = new \PDO("mysql:host=localhost;dbname=test");
$configuration->setDataBackendContainer(new PDODataBackendContainer($pdo));

$configuration->setUpdatePlan(new AutomaticUpdatePlan());

return $configuration;
Namespace: malkusch\bav
License: GPL
Author: Markus Malkusch <markus@malkusch.de>
See: malkusch\bav\Configuration
Link: Donations
Api
Located at ConfigurationRegistry.php
Methods summary
public static
# classConstructor( )

locate a configuration or register the default configuration.

locate a configuration or register the default configuration.

You may define the file bav/configuration.php. This file should return a Configuration object.

Throws

ConfigurationException

See

malkusch\bav\DefaultConfiguration
public static
# setConfiguration( malkusch\bav\Configuration $configuration )

Register a configuration programmatically.

Register a configuration programmatically.

Alternatively you can provide the file bav/configuration.php which returns a malkusch\bav\Configuration object.

public static malkusch\bav\Configuration
# getConfiguration( )

Returns the configuration

Returns the configuration

Returns

malkusch\bav\Configuration
Constants summary
string BAV_PATH "/../../configuration.php"
#
string INCLUDE_PATH "bav/configuration.php"
#
API documentation generated by ApiGen 2.8.0