public function getConstant($constantName)
{
if (!is_string($constantName)) {
throw new \InvalidArgumentException('$constantName must be string type');
}
if (empty($constantName)) {
throw new \InvalidArgumentException('$constantName must not be empty: ' . $constantName);
}
if (isset($this->constants[$constantName])) {
return $this->constants[$constantName];
}
$extendsClassDefinition = $this->getExtendsClassDefinition();
if ($extendsClassDefinition) {
if ($extendsClassDefinition->hasConstant($constantName)) {
return $extendsClassDefinition->getConstant($constantName);
}
}
/**
* Gets constant from interfaces
*/
return $this->getConstantFromInterfaces($constantName);
}