Factory.php
43 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Matomo - free/libre analytics platform |
| 5 | * |
| 6 | * @link https://matomo.org |
| 7 | * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 8 | */ |
| 9 | namespace Piwik\Updater\Migration\Config; |
| 10 | |
| 11 | use Piwik\Container\StaticContainer; |
| 12 | /** |
| 13 | * Provides config migrations. |
| 14 | * |
| 15 | * @api |
| 16 | */ |
| 17 | class Factory |
| 18 | { |
| 19 | /** |
| 20 | * @var \Piwik\Container\Container |
| 21 | */ |
| 22 | private $container; |
| 23 | /** |
| 24 | * @ignore |
| 25 | */ |
| 26 | public function __construct() |
| 27 | { |
| 28 | $this->container = StaticContainer::getContainer(); |
| 29 | } |
| 30 | /** |
| 31 | * Sets a configuration to the Matomo config file |
| 32 | * |
| 33 | * @param string $section |
| 34 | * @param string $key |
| 35 | * @param string $value |
| 36 | * @return Set |
| 37 | */ |
| 38 | public function set($section, $key, $value) |
| 39 | { |
| 40 | return $this->container->make('Piwik\\Updater\\Migration\\Config\\Set', array('section' => $section, 'key' => $key, 'value' => $value)); |
| 41 | } |
| 42 | } |
| 43 |