1.0.0 Alpha Release #59

Merged
netkas merged 213 commits from v1.0.0_alpha into master 2023-01-29 23:27:58 +00:00
Showing only changes of commit 0fbb374507 - Show all commits

View file

@ -68,4 +68,24 @@
unset(self::$Constants[$constant_hash]);
}
/**
* Gets the constant
*
* @param string $scope
* @param string $name
* @return string|null
*/
public static function get(string $scope, string $name): ?string
{
if(!Validate::constantName($name))
return null;
$constant_hash = Resolver::resolveConstantHash($scope, $name);
if(isset(self::$Constants[$constant_hash]))
return self::$Constants[$constant_hash]->getValue();
return null;
}
}