Replies: 2 comments
-
$class
->addConstant('TYPE', new \Nette\PhpGenerator\Literal('\Foo\Bar::class'))
->setVisibility('protected'); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dg
-
thx! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
is it possible to use a constant as a value?
example:
generated:
protected const TYPE = '\Foo\Bar::class';
i need:
protected const TYPE = \Foo\Bar::class;
Beta Was this translation helpful? Give feedback.
All reactions