Skip to content

Set const value to class const #73

Answered by mabar
pilot114 asked this question in Q&A
Discussion options

You must be logged in to vote
$class
            ->addConstant('TYPE', new \Nette\PhpGenerator\Literal('\Foo\Bar::class'))
            ->setVisibility('protected');

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by dg
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #73 on December 26, 2020 19:17.