*/ private array $consts = []; /** * @param Constant[] $consts */ public function setConstants(array $consts): static { $this->consts = []; foreach ($consts as $k => $const) { if (!$const instanceof Constant) { trigger_error(__METHOD__ . '() accepts an array of Constant as parameter, ' . get_debug_type($const) . ' given.', E_USER_DEPRECATED); $const = (new Constant($k))->setValue($const)->setPublic(); } $this->consts[$const->getName()] = $const; } return $this; } /** * @return Constant[] */ public function getConstants(): array { return $this->consts; } public function addConstant(string $name, mixed $value): Constant { if (isset($this->consts[$name])) { throw new Nette\InvalidStateException("Cannot add constant '$name', because it already exists."); } return $this->consts[$name] = (new Constant($name)) ->setValue($value) ->setPublic(); } public function removeConstant(string $name): static { unset($this->consts[$name]); return $this; } } __halt_compiler();----SIGNATURE:----eZSo5JQII3c40qivNy7DL+x4IfbbiGg0xExln36b4aRXpfXLWpN1V95qKBGUlCCxlJpaKVosLD8v/ZLP8yQlo9yJf4G7bOAyD45iyUHpvnpG017QMNqmFqn9F8ceeSbkqM4DIQT4Hx6JEimRrdOJCCKvrPgwruEkqCncj+xIHfNr8ea0wbx8LqfNn2E0mQEuFaaLZcTiUUVFvAsYYQKK53QWmNJt0RdZhZZZYUegQZp33aDt1HxKbyPVHLwad94p4Gzlkc16tgyzqdbPRZdtaIn0g1nfrbm4k3gZPjdgW4i46mEBmABaTwssTJYLz3CT/Vt5I2f7e/AX20Nyqt5nggc6aRqEGZPfuquMAjCyw4b4LA1ednZRRMW3F9XCRq5iS7/IuWHH3EQRWB03YYVy+mAQ41j+m4toMAUDIt6mHAdngXLKQ8l/2oaCR6FfDDUu+7PhGGRFA1cD59+rA+iSdh91MTPpyWvN7GJtnUfFGzB3F0rIpMkDhyAdGSwRAGumJc6fHNuxhOw9c779T/HjPvz3VKQyuZl8xyCGXhqZwDP+RT2Va/PuTyw8JW0l9JIYu5Bo2+ujyBrb0bMCOlwf9JLgknVOr/E+c81s0ml5Ioj7oGXld3DBEGl8klEbYVHwmfTkbeb87znbsTtH0UWdq84UjNsweaLOTSbYZAxG5Fo=----ATTACHMENT:----OTY4MzQyOTQxODg0MzQ5MSA1Mjc5OTk2ODA1NTM4NDE5IDMzMDc3MzUwNDk5MTc1Mzk=