@@ -10,7 +10,6 @@ |
||
10 | 10 | use Zend\Db\Sql\Ddl\Column\Varchar; |
11 | 11 | use Zend\Db\Sql\Ddl\Constraint\UniqueKey; |
12 | 12 | use Zend\Db\Sql\Ddl\CreateTable; |
13 | -use Zend\Db\Sql\Insert; |
|
14 | 13 | use Zend\Db\Sql\Sql; |
15 | 14 | |
16 | 15 | class RelationalDatabase implements StorageInterface |
@@ -49,6 +49,9 @@ discard block |
||
49 | 49 | return $possibleLocations; |
50 | 50 | } |
51 | 51 | |
52 | + /** |
|
53 | + * @param string|null $file |
|
54 | + */ |
|
52 | 55 | protected function writeMagiumConfigurationFile($file) |
53 | 56 | { |
54 | 57 | file_put_contents($file, <<<XML |
@@ -70,6 +73,9 @@ discard block |
||
70 | 73 | ); |
71 | 74 | } |
72 | 75 | |
76 | + /** |
|
77 | + * @param string|null $configPath |
|
78 | + */ |
|
73 | 79 | protected function getContextFileFromConfigPath($configPath) |
74 | 80 | { |
75 | 81 | $basePath = dirname($configPath); |
@@ -77,6 +83,9 @@ discard block |
||
77 | 83 | return $contextPath; |
78 | 84 | } |
79 | 85 | |
86 | + /** |
|
87 | + * @param string $contextPath |
|
88 | + */ |
|
80 | 89 | protected function writeContextFileXml($contextPath) |
81 | 90 | { |
82 | 91 | file_put_contents($contextPath, <<<XML |
@@ -120,6 +129,9 @@ discard block |
||
120 | 129 | } |
121 | 130 | |
122 | 131 | |
132 | + /** |
|
133 | + * @param string $contextPath |
|
134 | + */ |
|
123 | 135 | protected function askContextFileQuestion(InputInterface $input, OutputInterface $output, $contextPath) |
124 | 136 | { |
125 | 137 | $question = new ConfirmationQuestion(sprintf('The context file %s does not exist next to the magium-configuration.xml file. Create it? ', $contextPath)); |
@@ -68,6 +68,9 @@ |
||
68 | 68 | return $cacheFactory->getCache($element); |
69 | 69 | } |
70 | 70 | |
71 | + /** |
|
72 | + * @return Builder |
|
73 | + */ |
|
71 | 74 | public function getBuilder() |
72 | 75 | { |
73 | 76 | if (!$this->builder instanceof Builder) { |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use Magium\Configuration\Config\BuilderFactoryInterface; |
8 | 8 | use Magium\Configuration\Manager\CacheFactory; |
9 | 9 | use Magium\Configuration\Manager\Manager; |
10 | -use Zend\Cache\StorageFactory; |
|
11 | 10 | |
12 | 11 | class MagiumConfigurationFactory |
13 | 12 | { |
@@ -25,12 +25,12 @@ discard block |
||
25 | 25 | $this->cache = $cache; |
26 | 26 | $this->builder = $builder; |
27 | 27 | $this->localCache = $localCache; |
28 | - } |
|
28 | + } |
|
29 | 29 | |
30 | - public function getBuilder() |
|
31 | - { |
|
32 | - return $this->builder; |
|
33 | - } |
|
30 | + public function getBuilder() |
|
31 | + { |
|
32 | + return $this->builder; |
|
33 | + } |
|
34 | 34 | |
35 | 35 | /** |
36 | 36 | * @param string $context The (configurable) context for the needed configuration object |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | if ($this->localCache instanceof StorageInterface) { |
76 | 76 | $this->localCache->setItem($currentConfigItem, $config); |
77 | 77 | } |
78 | - } |
|
78 | + } |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | if ($config) { |