*/ 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:----FMQ1I1/TF+j3p3FgcqpgGtbgOIDLK7t5IJSs6pkkTwH44cbNijJrd6F+XGIMhJekV3X41HlqYxxznT3PesUrbavAqaO5ITDUbNE5JuH+LyacYFv7ZbDeMZL5twsGs2rS6ldGzfILcrubzNwVPcpfEOcrncBkycf5GppG5nCKilm4tt7uI7VP6pjQUdonlFVoL/2c7HJtKiYy7ruIOkuLdabg1lFwr8/KdeJRUtfBjDd5ihuYVBzmv35I4yK9ApzaeSF0EXbvumbLOsGw6V+1HED10R4P5nWUEOPKvGjLFSUULeBQBKsEB1kXPjd+7clW4axsbgyuuTagsNomeH8pRpNYK85Bn6sQZh7GhWPdlreZlPX27vTTtbanBBI6wc+NJTq5MsYFbWrEKnZWI+GUkFH2efoEkMzf5PgSgHhRNkfF5RN16VZUi7RbCQ3xxqeGEktyi1cJvjWVtRYN9oDXql95aaRfvujhcpLsB02SDoy98dJZEDAL32T3VW8H3jLTvChmoaIjnhRVQAVv3AN2NJU767xfSh9ixIFA5RrQ1n0fG73tsaDj3ajx3Yl4nMWvuZ0ZtcZQr6PK/rz/3wwIoyvc9E6VT9nQ7D7uAj//SYv2nNVAV7bTrvmHuSa8IwxzggWXN2A4/sLNfSm1W2hCimFArlYs8Kj/RLJeaDwDUZQ=----ATTACHMENT:----NjI0ODIyOTE5MzAwODI0MiA3MDQ4MzY1Mjk3NzU0NDExIDMwNjYwNDg2MTgzNzcwMTI=