diff --git a/src/installer/extension b/src/installer/extension index 64b76f4..2ccc72b 100644 --- a/src/installer/extension +++ b/src/installer/extension @@ -134,4 +134,37 @@ return Runtime::getDataPath($package); } } + + if(!function_exists('get_constant')) + { + /** + * Returns the value of a constant defined in NCC's runtime environment + * + * @param string $package + * @param string $name + * @return string|null + */ + function get_constant(string $package, string $name): ?string + { + return Runtime::getConstant($package, $name); + } + } + + if(!function_exists('set_constant')) + { + /** + * Sets the value of a constant defined in NCC's runtime environment + * + * @param string $package + * @param string $name + * @param string $value + * @return void + * @throws ConstantReadonlyException + * @throws InvalidConstantNameException + */ + function set_constant(string $package, string $name, string $value): void + { + Runtime::setConstant($package, $name, $value); + } + } } \ No newline at end of file