| 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\DI\Extensions; |
| 9 |
|
| 10 |
use Packetery\Nette; |
| 11 |
/** |
| 12 |
* Constant definitions. |
| 13 |
* @deprecated use \Packetery\Nette\Bootstrap\Extensions\ConstantsExtension |
| 14 |
*/ |
| 15 |
final class ConstantsExtension extends \Packetery\Nette\DI\CompilerExtension |
| 16 |
{ |
| 17 |
public function loadConfiguration() |
| 18 |
{ |
| 19 |
\trigger_error(self::class . ' is deprecated, use \\Packetery\\Nette\\Bootstrap\\Extensions\\ConstantsExtension.', \E_USER_DEPRECATED); |
| 20 |
foreach ($this->getConfig() as $name => $value) { |
| 21 |
$this->initialization->addBody('define(?, ?);', [$name, $value]); |
| 22 |
} |
| 23 |
} |
| 24 |
} |
| 25 |
|