| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* This file is part of the Nette Framework (https://nette.org) |
| 5 |
* Copyright (c) 2004 David Grudl (https://davidgrudl.com) |
| 6 |
*/ |
| 7 |
declare (strict_types=1); |
| 8 |
namespace Packetery\Nette\Bootstrap\Extensions; |
| 9 |
|
| 10 |
use Packetery\Nette; |
| 11 |
/** |
| 12 |
* Constant definitions. |
| 13 |
*/ |
| 14 |
final class ConstantsExtension extends \Packetery\Nette\DI\CompilerExtension |
| 15 |
{ |
| 16 |
public function loadConfiguration() |
| 17 |
{ |
| 18 |
foreach ($this->getConfig() as $name => $value) { |
| 19 |
$this->initialization->addBody('define(?, ?);', [$name, $value]); |
| 20 |
} |
| 21 |
} |
| 22 |
} |
| 23 |
|