@@ -128,7 +128,7 @@ |
||
| 128 | 128 | $table->addColumn(new Text('value')); |
| 129 | 129 | $table->addColumn(new Varchar('context', 255)); |
| 130 | 130 | $table->addConstraint( |
| 131 | - new UniqueKey(['path','context'], 'configuration_uniqueness_index') |
|
| 131 | + new UniqueKey(['path', 'context'], 'configuration_uniqueness_index') |
|
| 132 | 132 | ); |
| 133 | 133 | |
| 134 | 134 | $sql = new Sql($this->adapter); |
@@ -3,13 +3,9 @@ |
||
| 3 | 3 | namespace Magium\Configuration\Console\Command; |
| 4 | 4 | |
| 5 | 5 | use Magium\Configuration\Config\ConfigurationRepository; |
| 6 | -use Magium\Configuration\Config\ConfigInterface; |
|
| 7 | -use Magium\Configuration\MagiumConfigurationFactory; |
|
| 8 | -use Magium\Configuration\MagiumConfigurationFactoryInterface; |
|
| 9 | 6 | use Symfony\Component\Console\Command\Command; |
| 10 | 7 | use Symfony\Component\Console\Input\InputArgument; |
| 11 | 8 | use Symfony\Component\Console\Input\InputInterface; |
| 12 | -use Symfony\Component\Console\Input\InputOption; |
|
| 13 | 9 | use Symfony\Component\Console\Output\OutputInterface; |
| 14 | 10 | |
| 15 | 11 | class ConfigurationSet extends Command |
@@ -2,11 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Magium\Configuration\Console\Command; |
| 4 | 4 | |
| 5 | -use Magium\Configuration\Config\ConfigurationRepository; |
|
| 6 | -use Magium\Configuration\Config\InvalidContextException; |
|
| 7 | -use Magium\Configuration\MagiumConfigurationFactory; |
|
| 8 | 5 | use Symfony\Component\Console\Command\Command; |
| 9 | -use Symfony\Component\Console\Input\InputArgument; |
|
| 10 | 6 | use Symfony\Component\Console\Input\InputInterface; |
| 11 | 7 | use Symfony\Component\Console\Output\OutputInterface; |
| 12 | 8 | |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Magium\Configuration\Config\InvalidConfigurationLocationException; |
| 6 | 6 | use Magium\Configuration\Config\InvalidDirectoryException; |
| 7 | 7 | use Magium\Configuration\File\AdapterInterface; |
| 8 | -use Magium\Configuration\File\InvalidFileException; |
|
| 9 | 8 | |
| 10 | 9 | class ConfigurationFileRepository implements \ArrayAccess, \Iterator, \Countable |
| 11 | 10 | { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
| 104 | - * @param ConfigurationRepository|null $config |
|
| 104 | + * @param null|ConfigInterface $config |
|
| 105 | 105 | * @return ConfigurationRepository |
| 106 | 106 | * @throws InvalidConfigurationLocationException |
| 107 | 107 | * @throws InvalidFileException |
@@ -158,6 +158,9 @@ discard block |
||
| 158 | 158 | return $structure; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | + /** |
|
| 162 | + * @param string $callbackString |
|
| 163 | + */ |
|
| 161 | 164 | protected function executeCallback($callbackString, $value) |
| 162 | 165 | { |
| 163 | 166 | if (function_exists($callbackString)) { |
@@ -198,7 +201,8 @@ discard block |
||
| 198 | 201 | |
| 199 | 202 | /** |
| 200 | 203 | * @param \SimpleXMLElement $structure The object representing the merged configuration structure |
| 201 | - * @param \SimpleXmlElement $config An empty config object to be populated |
|
| 204 | + * @param ConfigInterface $config An empty config object to be populated |
|
| 205 | + * @param string $context |
|
| 202 | 206 | * @return ConfigurationRepository The resulting configuration object |
| 203 | 207 | */ |
| 204 | 208 | |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use Magium\Configuration\Container\GenericContainer; |
| 9 | 9 | use Magium\Configuration\File\AdapterInterface; |
| 10 | 10 | use Magium\Configuration\File\Configuration\ConfigurationFileRepository; |
| 11 | -use Magium\Configuration\File\Configuration\UnsupportedFileTypeException; |
|
| 12 | 11 | use Magium\Configuration\File\InvalidFileException; |
| 13 | 12 | use Magium\Configuration\InvalidConfigurationException; |
| 14 | 13 | use Zend\Cache\Storage\StorageInterface; |
@@ -43,6 +43,9 @@ |
||
| 43 | 43 | return $this->container[$id]; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | + /** |
|
| 47 | + * @param string $type |
|
| 48 | + */ |
|
| 46 | 49 | public function newInstance($type) |
| 47 | 50 | { |
| 48 | 51 | $reflection = new \ReflectionClass($type); |