Overview

Namespaces

  • malkusch
    • bav
  • PHP

Classes

  • Agency
  • AutomaticUpdatePlan
  • BAV
  • Configuration
  • ConfigurationRegistry
  • DataBackendContainer
  • DefaultConfiguration
  • DoctrineBackendContainer
  • FileDataBackendContainer
  • LogUpdatePlan
  • PDODataBackendContainer
  • UpdatePlan
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: namespace malkusch\bav;
 4: 
 5: /**
 6:  * Default configuration uses {@link FileDataBackendContainer}
 7:  * and any available UTF-8 encoder.
 8:  * 
 9:  * Automatic installation is enabled.
10:  * 
11:  * The update plan is set to {@link LogUpdatePlan}
12:  * 
13:  * If no UTF-8 encoding is supported ISO-8859-15 will be used.
14:  *
15:  * @author Markus Malkusch <markus@malkusch.de>
16:  * @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
17:  * @license GPL
18:  * @api
19:  */
20: class DefaultConfiguration extends Configuration
21: {
22: 
23:     public function __construct()
24:     {
25:         $this->setAutomaticInstallation(true);
26: 
27:         $this->setUpdatePlan(new LogUpdatePlan());
28: 
29:         $this->setDataBackendContainer(new FileDataBackendContainer());
30: 
31:         $encoding = null;
32:         try {
33:             $encoding = Encoding::getInstance("UTF-8");
34: 
35:         } catch (UnsupportedEncodingException $e) {
36:             trigger_error("UTF-8 is not supported; bav is falling back to ISO-8859-15", E_WARNING);
37:             $encoding = Encoding::getInstance("ISO-8859-15");
38: 
39:         }
40:         $this->setEncoding($encoding);
41:     }
42: }
43: 
API documentation generated by ApiGen 2.8.0