Witam,
Mam taki kod:
final class EnumClass extends Enum
{
protected const ERROR_STATUS = 'kod html [[X]] error';
protected const WARNING_STATUS = 'kod html [[X]] warning error';
protected const SUCCESS_STATUS = 'kod html [[X]] success error';
}
Enum - jest klasą abstrakcyjną
chciałbym pobrać te dane:
$html = EnumClass::${$messageType}
i otrzymuję komunikat: Uncaught exception: 'Error' with message 'Access to undeclared static property.
W jaki sposób poprawnie to zapisać?