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:  * Configuration
  7:  * 
  8:  * @author Markus Malkusch <markus@malkusch.de>
  9:  * @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
 10:  * @license GPL
 11:  * @see ConfigurationRegistry
 12:  * @api
 13:  */
 14: class Configuration
 15: {
 16: 
 17:     /**
 18:      * @var bool
 19:      */
 20:     private $automaticInstallation;
 21: 
 22:     /**
 23:      * @var Encoding
 24:      */
 25:     private $encoding;
 26: 
 27:     /**
 28:      * @var DataBackendContainer
 29:      */
 30:     private $backendContainer;
 31: 
 32:     /**
 33:      * @var UpdatePlan
 34:      */
 35:     private $updatePlan;
 36: 
 37:     /**
 38:      * @var string
 39:      */
 40:     private $tempDirectory;
 41: 
 42:     /**
 43:      * Sets the update plan.
 44:      * 
 45:      * Set to null if you don't want to use an update plan.
 46:      */
 47:     public function setUpdatePlan(UpdatePlan $updatePlan = null)
 48:     {
 49:         $this->updatePlan = $updatePlan;
 50:     }
 51: 
 52:     /**
 53:      * Gets the update plan.
 54:      *
 55:      * @return UpdatePlan|null
 56:      */
 57:     public function getUpdatePlan()
 58:     {
 59:         return $this->updatePlan;
 60:     }
 61: 
 62:     /**
 63:      * Turns automatic installation on or off.
 64:      * 
 65:      * If automatic installation is activated {@link DataBackendContainer} will
 66:      * check if it is installed and if not install the backend.
 67:      * 
 68:      * @see DataBackend::install()
 69:      * @param bool $automaticInstallation Set true to turn installation on
 70:      */
 71:     public function setAutomaticInstallation($automaticInstallation)
 72:     {
 73:         $this->automaticInstallation = $automaticInstallation;
 74:     }
 75: 
 76:     /**
 77:      * Returns true if automatic installation is activated.
 78:      *
 79:      * @return bool
 80:      */
 81:     public function isAutomaticInstallation()
 82:     {
 83:         return $this->automaticInstallation;
 84:     }
 85: 
 86:     /**
 87:      * Sets the data {@link DataBackendContainer}.
 88:      */
 89:     public function setDataBackendContainer(DataBackendContainer $backendContainer)
 90:     {
 91:         $this->backendContainer = $backendContainer;
 92:     }
 93: 
 94:     /**
 95:      * Returns the {@link DataBackendContainer}.
 96:      *
 97:      * @return DataBackendContainer
 98:      */
 99:     public function getDataBackendContainer()
100:     {
101:         return $this->backendContainer;
102:     }
103:     
104:     /**
105:      * Sets the encoding.
106:      */
107:     public function setEncoding(Encoding $encoding)
108:     {
109:         $this->encoding = $encoding;
110:     }
111: 
112:     /**
113:      * Returns the encoding.
114:      *
115:      * @return Encoding
116:      */
117:     public function getEncoding()
118:     {
119:         return $this->encoding;
120:     }
121: 
122:     /**
123:      * Sets the temporary directory.
124:      * 
125:      * If you set a temporary directory BAV will use this for temporary files.
126:      * This option is optional. If it is not set the system's path will be used.
127:      * 
128:      * The temporary directory is used for the installation and update process.
129:      * 
130:      * @param string $tempDirectory
131:      */
132:     public function setTempDirectory($tempDirectory)
133:     {
134:         $this->tempDirectory = $tempDirectory;
135:     }
136: 
137:     /**
138:      * Returns the optional configured temporary directory.
139:      *
140:      * @return string
141:      */
142:     public function getTempDirectory()
143:     {
144:         return $this->tempDirectory;
145:     }
146: }
147: 
API documentation generated by ApiGen 2.8.0