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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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